Reputation: 1244
I have a NSArray of NSDictionary which is like the following.
({
a = 'one'
b = 'two'
},
{
a = 'ten'
b = 'eleven'
})
How can I filter all values of key 'b' which will eventually return me a NSArray like this,
('two','eleven')
Can it be done with just using NSPredicate without having to loop?
Upvotes: 3
Views: 2129
Reputation: 170839
You can do it with single method in NSArray:
NSArray *resultArray = [yourArray valueForKey:@"b"];
Upvotes: 10