Search NSArray for value matching value
Why not just to use predicates to do that for you?: // For number kind of values: NSPredicate *predicate = [NSPredicate predicateWithFormat:@”SELF = %@”, value]; NSArray *results = [array_to_search filteredArrayUsingPredicate:predicate]; // For string kind of values: NSPredicate *predicate = [NSPredicate predicateWithFormat:@”SELF contains[cd] %@”, value]; NSArray *results = [array_to_search filteredArrayUsingPredicate:predicate]; // For any object kind of … Read more