NSArray *arr = [NSArray arrayWithObjects:@"m",
@"f",
@"m",
@"f",
@"f",
nil];
How can I put all the values of @"f" into it’s own array simply? Using a key-value collection operator (not using manual loop)?
eg I would think it might look like [arr valueForKeyPath:@"self==f"]. Any suggestions?
You can use an NSPredicate: