解析Json以获取一个NSArray中的所有内容

那是内容……

[ { "id": "", "title": "", "website": "", "categories": [ { "id": "", "label": "" } ], "updated": }, { "id": "", "title": "", "website": "", "categories": [ { "id": "", "label": "" } ], "updated": } ] 

如何在一个arrays中插入每个Feed源?

  NSDictionary *results = [string JSONValue]; NSArray *subs = [results valueForKey:@"KEY"]; 

我必须插入哪个键? 谢谢

因为我可以看到你的结构,你将摆脱这个JSON-String

 NSArray: [ NSDictionary: { NSString: "id", NSString: "title", NSString: "website", NSArray: "categories": [ NSDictionary: { NSString: "id", NSString: "label" } ], NSNumber: "updated" }, NSDictionary: { ... } ] 

所以你已经在root上有一个“Feeds”数组,你必须用数组中的索引来对它们进行迭代。 对于第一个id,即[[myJsonStructure objectAtIndex:0] objectForKey:@"id"];