0
我想從JSON文件中獲取對象但獲取error.I想要將此數據顯示到tbaleview。從JSON獲取對象
OrganizationList = ( ( 17, TGB, Ahmedabad, "SG Highway", Dover, "Georgia", 388306, 12345, "www.abc.com", "37.23909", "-122.34567", "Dec 6, 2013 5:11:15 PM" ) ); isError = 0; message = "Organization List is...";
我想從這個取 「TGB」 ...... 我已經試過這
for(int i=0;i<[tempDataArray count];i++){
[temp addObject:[tempDataArray objectAtIndex:i]];
NSLog(@"temp%@",temp);
[searchArray addObject:[temp objectAtIndex:0]];
NSLog(@"searcharray with name%@",searchArray);
NSLog(@"name%@",[searchArray objectAtIndex:1]);
}
這裏是tempArray ...
(
(
17,
TGB,
Ahmedabad,
"SG Highway",
Dover,
"Georgia",
388306,
12345,
"www.abc.com",
"37.23909",
"-122.34567",
"Dec 6, 2013 5:11:15 PM"
)
)
but this is giving me error index out of bound at index 1.
什麼是'searchArray'的nslog? –
顯示json解析的代碼 –