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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -