NSDictionary *returnDictionary = notification.userInfo; NSLog(@"llllllllllllllllloooooooooooo:%@",returnDictionary); NSMutableArray *gg=returnDictionary[@"musiclistsss"];
為了更加方便的從多重字典里嵌套數組在這里記錄下解套的方法,就可以按嵌套的多少慢慢解了!
數組里面嵌套了字典,如圖
你就這樣
NSMutableArray *gg=dict;//把字典轉成可變數組 // NSLog(@"%@",gg[0]); NSDictionary *dict1=gg[0];//讀取數組后再轉回字典 NSLog(@"%@",dict1[@"country"]);
for (int i=0; i<gg.count; i++) { NSDictionary *dict3=[gg objectAtIndex:i]; NSLog(@"%@",dict3[@"country"]); }