Let's suppose I have an NSArray of Person objects, those are composed of 2 properties( name and age ). Just for the sake of understanding how it works and practice I would like to know how to create a predicate that accesses every member of the array and filters all the objects with an age property that its bigger or equal to 30. I just can't figure that out:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@">= 30"];
[persons filteredArrayUsingPredicate:predicate];
NSLog(@"%@",persons)
What should I type on predicateWithFormat? Thank you in advance!