NSDictionary objectForKey to var name
问题 Is it possible to dynamically name a variable (mine is specifically a char array) by the name of a key that is read from NSDicttionary .plist? NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"path/to/plist"]; NSDictionary * getKeys = [readDict objectForKey:@"info"]; for (id key in getKeys) { NSLog(@"%@ %@", key, [getKeys objectForKey:key]); // output key1 some data in here== (repeats with key2, etc.) NSData *theData = [getKeys objectForKey:key]; const char