I have a project that has a few NSMutableDict nested PROJECTS Dict / LOCATIONS Dict / ITEM_NAME Dict / ITEM_PARTS Array.
Each ITEM_NAME has a KEY for example @"Box1" and Box1 has a VALUE that is an array with the parts list of what is in that box.
I am wondering if there is an easier way to get the keys from ITEM_NAME? Curently I do something like this
Is there a shortcut that I can nest it to get the keys out without having to create all of these Dict objects as I dig for the one that I want? Something that can be done on 1 line?
Each ITEM_NAME has a KEY for example @"Box1" and Box1 has a VALUE that is an array with the parts list of what is in that box.
I am wondering if there is an easier way to get the keys from ITEM_NAME? Curently I do something like this
Code:
NSMutableDict *projectDict = [NSMutDict alloc] init from my plist file];
NSMutableDict *locationDict = [NSMutDict initWithDict:[projDict objectForKey@"location"]];
NSMutableDict *ItemsDict = [NSMutDict initWithDict:[locationDict objectForKey@"items"]];
NSArray *itemsArray = [itemsDict allKeys];
Is there a shortcut that I can nest it to get the keys out without having to create all of these Dict objects as I dig for the one that I want? Something that can be done on 1 line?