Help parsing a nested JSON object

前端 未结 3 1227
别那么骄傲
别那么骄傲 2021-01-06 17:01

I have the following JSON:

{
    \"meta\": {
        \"code\": 200
    }, 
    \"response\": {
        \"deals\": [
            {
                   


        
3条回答
  •  星月不相逢
    2021-01-06 17:39

    [[deal valueForKey:@"business"] valueForKey:@"locations"] returns an array. Calling -valueForKey: on an NSArray executes valueForKey: for every object in the array and returns an array of the results (see the NSArray documentation for this). So that's what you get, an array of the corresponding values.

提交回复
热议问题