How to create an NSDictionary with multiple keys?

前端 未结 5 840
臣服心动
臣服心动 2020-12-30 12:34

I am not sure if what I am going to ask is actually an NSDictionary with multiple keys but ok.

What I want to do is create an NSDictionary

5条回答
  •  Happy的楠姐
    2020-12-30 13:12

    if you want multiple categories , you can follow this format

    NSDictionary *jsonObject = @{
                               @"data1":@[
                                  @{
                                    @"title":@"A"
    
                                    @"subData" : @[
                                    @{
                                      @"title":@"aa"
                                     }]
                                    }
    
                                 ]
                             };
    

提交回复
热议问题