Check if NSString exists in custom object in NSArray
- by Paul Peelen
I have an NSArray with Store objects. Each Store object has two NSString objects; StoreID and Name.
I would like to check quickly if an ID exists in this NSArray with Store objects.
Example:
Store *s1 = [[Store alloc] init];
s1.name = @"Some Name";
s1.id = @"123ABC";
Store *s2 = [[Store alloc] init];
s2.name = @"Some Other Name";
s2.id =…