内容就是这样...
[
{
"id": "",
"title": "",
"website": "",
"categories": [
{
"id": "",
"label": ""
}
],
"updated":
},
{
"id": "",
"title": "",
"website": "",
"categories": [
{
"id": "",
"label": ""
}
],
"updated":
}
]
如何将每个 feed 源插入一个数组中?
NSDictionary *results = [string JSONValue];
NSArray *subs = [results valueForKey:@"KEY"];
我必须插入哪把钥匙?
谢谢
正如我所看到的,你将摆脱这个 JSON 字符串
NSArray:
[
NSDictionary:
{
NSString: "id",
NSString: "title",
NSString: "website",
NSArray: "categories":
[
NSDictionary:
{
NSString: "id",
NSString: "label"
}
],
NSNumber: "updated"
},
NSDictionary:
{
...
}
]
因此,您在根目录下已经有了一个“Feeds”数组,并且必须使用它们在数组中的索引来迭代它们。对于第一个ID,即[[myJsonStructure objectAtIndex:0] objectForKey:@"id"];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)