iphone - NSPredicate query -



iphone - NSPredicate query -

i have used nspredicate before different purpose. stuck in next scenario query.

i have array persons contains person objects i.e persons array of objects. need collect names_ person objects persons array. know can through loop can through nspredicate or more optimize way?

nsmutablearray *names; (int i=0; i<[persons count]; i++) { [names addobject:[[persons objectatindex:i] names_]]; }

this 1 line do,

[personarray valueforkeypath:@"@unionofobjects.name"]

iphone objective-c nspredicate

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -