NSDictionnary到NSString

时间:2016-03-25 08:16:46

标签: ios objective-c

我有一个类似的NSDictionary :(
1,
2,
3

我想分配一个这样的NSString:123,怎么样?谢谢

我的代码:

NSDictionary *keys = [self.json valueForKeyPath:@"survey.questions.id"][0][0];

NSString *keysString = [NSString stringWithFormat:@"my dictionary is %@", keys];

1 个答案:

答案 0 :(得分:0)

NSArray *keys = [dict allKeys];
NSString *result = [[keys valueForKey:@"description"] componentsJoinedByString:@""];