Skip to content

Instantly share code, notes, and snippets.

@NikolaKirev
Created February 13, 2013 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NikolaKirev/4942548 to your computer and use it in GitHub Desktop.
Save NikolaKirev/4942548 to your computer and use it in GitHub Desktop.
Filtering an array with NSPredicate
NSString *companyName =@”Apple”;
NSPredicate *predicate =[NSPredicate predicateWithFormat:@"company == %@", companyName];
NSArray *filteredArray =[originalArray filteredArrayUsingPredicate: predicate];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment