ios - How to use NSPredicate with Multidimensional array (where the predicateFormat exists at valueForKeyPath) -


i have array 'id' on want filter array exists @ valueforkeypath 'objectid' of each of dictionaries. how compare predicates in valueforkeypath.

currently.. predicate

nspredicate * objidpredicate = [nspredicate predicatewithformat:@"objectid = %@",obj]; nsarray * oneorder = [array filteredarrayusingpredicate:objidpredicate]; 

is considering key , values of array elements, not ones @ valueforkeypath=@"objectid"

use "self"in code array element's valueforkeypath

nspredicate *objidpredicate =[nspredicate predicatewithformat:@"(self.objectid = %@)",obj];

`


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -