I have a large NSDictionary
that I need to loop through and create separate NSArray
s. Here are the contents:
(
{
id =
Modern Objective-C syntax:
NSMutableArray *things = [NSMutableArray array];
NSMutableArray *stuff = [NSMutableArray array];
NSMutableArray *bits = [NSMutableArray array];
[dictionaries enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
[things addObject:[obj valueForKeyPath:@"thing"]];
[stuff addObject:[obj valueForKeyPath:@"enclosing_object.stuff"]];
[bits addObject:[obj valueForKeyPath:@"bits"]];
}];