我在NSDictionary中获得了以下JSON字符串:
{
"119":
{
"name": "Tidy The House",
"url": "https://www.website.com"
}
}
如何获取此JSON字符串的名称?
答案 0 :(得分:0)
尝试使用以下代码从字典中获取名称
for(NSString *key in [YOUR_DICTIONARY allKeys]){
NSDictionary *dic=[dictionary objectForKey:key];
NSLog(@"Name = %@",[dic objectForKey:@"name"]);
}