Parsing Json to get all the contents in one NSArray

a 夏天 提交于 2019-12-02 09:16:37

as I can see your structure, you will get out of this JSON-String

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

So you have already an array of "Feeds" at root and you have to itterate them with their index in the array with. For first id i.e. [[myJsonStructure objectAtIndex:0] objectForKey:@"id"];

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!