Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSString *targetId = @"toFind";
- NSMutableArray *results = [NSMutableArray new];
- for (NSDictionary *element in _categoryDictionary) {
- NSArray *subcategories = element[@"subcategories"];
- for (NSDictionary *aSubcategory in subcategories) {
- if ([aSubcategory[@"id"] isEqualToString:targetId]) {
- [results addObject:aSubcategory[@"locale"]];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement