How to get contents of NSMutableDictionary into NSMutable array?
I am trying following but its crashing
for(int i=0; i< [dict count] ; i++){
[array_listToDisplay addObject:[dict objectAtIndex:i] objectForKey:@"NAMES"];
}
Please help
How to get contents of NSMutableDictionary into NSMutable array?
I am trying following but its crashing
for(int i=0; i< [dict count] ; i++){
[array_listToDisplay addObject:[dict objectAtIndex:i] objectForKey:@"NAMES"];
}
Please help
Do you want the dictionary's keys, or the dictionary's values?
NSMutableArray *keys = [NSMutableArray arrayWithArray:[dict allKeys]];
NSMutableArray *values = [NSMutableArray arrayWithArray:[dict allValues]];
If you're trying to add all the objects in the dictionary to the array, you just do this:
[array_listToDisplay addObjectsFromArray:[dict allValues]];