iOS: Check For Object In NSMutableArray

A simple way to look for an object on NSMutableArray is to use containsObject. See below:

NSMutableArray *arr = [NSMutableArray arrayWithObjects:@"One", @"Two", @"Three", nil];
NSString *itm = @"Two";
if([arr containsObject:itm]) {
NSLog(@"Two found in big array");
}
2014-07-14T15:31:56-05:00