Filter entire NSDictionaries out of NSArray based on multiple keys

Posted by user270475 on Stack Overflow See other posts from Stack Overflow or by user270475
Published on 2010-03-16T19:37:20Z Indexed on 2010/03/16 19:41 UTC
Read the original article Hit count: 288

Filed under:
|

Hi, I have an NSArray of NSDictionary objects which I would like to be able to return a new array of NSDictionaries from, where every NSDictionary has "Area == North" (for example).

The closest example I have found so far is http://stackoverflow.com/questions/958622/using-nspredicate-to-filter-an-nsarray-based-on-nsdictionary-keys but this just returns the unique values for a given key, not the dictionary that has that key. Is there any way to perform a similar operation, and to return the entire dictionary?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c