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 exa
Sounds easy enough:
NSArray *unfilteredDictionaries; // however you get this...
NSMutableArray *filteredDictionaries =
[NSMutableArray arrayWithCapacity:[unfilteredDictionaries count]];
NSDictionary *dict;
for (dict in unfilteredDictionaries)
if ([[dict valueForKey:@"Area"] isEqualToString:@"North"])
[filteredDictionaries addObject:dict];
return filteredDictionaries;