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?
You can do it with single method in NSArray:
NSArray *resultArray = [yourArray valueForKey:@"b"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With