【发布时间】:2016-08-31 06:49:16
【问题描述】:
我有一本字典:
{
"FirstName" : "Katie",
"SecondName" : "Brown"
}
如何从上述字典中获取键值“FirstName”和“SecondName”
【问题讨论】:
-
不显示为有效的 JSON
-
if ([dict objectForKey:@"Firstname"] != nil) { // key not null }
-
可以使用 NSArray *arrKey = [dict allKeys]; NSArray *arrVal = [dict allValues];
-
@Shubhank 我没有从谷歌找到答案
标签: ios objective-c