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
Post a Comment