将JSON嵌套数组对象问题导入TableVIew

时间:2016-03-09 17:02:47

标签: ios objective-c json xcode ios9

我尝试了很多方法,但我无法从UITableView数组获取数据,并根据indexPathsomething中显示。 { "results": [ { "Something": [ [ { "airV": "LX", "class": "Y" } ] ], }, { "Something": [ [ { "airV": "FZ", "class": "Y" } ], [ { "airV": "FZ", "class": "Y" } ] ], }, ], } 就像下面的回复一样

something

注意:某些数组[] - >>>其中包含许多数组。加载"airV": "LX","class": "Y"数组我想获得TableView airv,分为whitespaceCharacterSet‌

1 个答案:

答案 0 :(得分:0)

您可以存储(某事物)的NSArray并基于NSIndexPath迭代该数组。

NSArray * arrayofSomething /* Your Array */
Inside your cellForRowAtIndexPath you can get the objects from arrayofSomething based on index.

Obj *obj = [arrayofSomething objectAtIndex:indexPath.row];