How to quickly search an array of objects in Objective-C
- by randombits
Is there a way in Objective-C to search an array of objects by the contained object's properties if the properties are of type string?
For instance, I have an NSArray of Person objects. Person has two properties, NSString *firstName and NSString *lastName.
What's the best way to search through the array to find everyone who matches 'Ken' anywhere in the firstName OR lastName properties?