如何将密钥2的值检索到NSString中?

时间:2016-07-19 09:11:33

标签: ios objective-c nsstring nsarray nsmutabledictionary

如何将NSMutableDictionary的键2的值检索到NSString?

我的回复数据

response{ 0 = { email = "grover@gmail.com"; firstname = Grover; }; 1 = { email = "hems@gmail.com"; firstname = Gems; }; 2 = { email = "rohit@gmail.com"; firstname = Rohit; }; }

1 个答案:

答案 0 :(得分:1)

NSDictionary *key2 = response[@"2"];
NSString *email = key2[@"email"];
NSString *firstname = key2[@"firstname"];