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

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -