Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSMutableArray - Query items without enumeration?

Using LINQ in .Net I can select items from an array that match a particular criteria i.e. from an array called People:

var cleverPeople = People.Where(o=>o.IQ>110);

Is there anything similar I can do to an NSMutableArray? I have many items in it and enumerating it with a loop is pretty costly performance wise.

like image 885
jdee Avatar asked Jun 15 '09 08:06

jdee


1 Answers

See -[NSArray filteredArrayUsingPredicate:].

like image 119
Chuck Avatar answered Sep 25 '22 02:09

Chuck