我正在从服务器以下响应iOS来解析JSON?
[{"id":"16","name":"Bob","age":"37"},{"id":"17","name":"rob","age":"28"}];
我使用它AFNetworking
框架,
我得到在NSData
上述反应,然后用下面的代码,我能收集到在NSDictionary
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:&error];
但如何将数据解析从NSDictionary
的"name"
和"age"
价值?
你也可以使用这种格式过于'[字典objectForKey:@“名”];' – Rugmangathan