次の JSON があります。
この JSON は、クマに酔ったウォッカを書きました :D
{
"Label": [ 1, 2, 3, 4, 5 ],
"ViewId": 1
}
コード:
NSURL * url = [NSURL URLWithString:getDataURL];
NSData * data = [NSData dataWithContentsOfURL:url];
json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
for (int i=0; i < json.count; i++)
{
NSString * FRid = [[json objectAtIndex:i] objectForKey:@"ViewId"]; //it's work
NSString * FRName = [[json objectAtIndex:i] objectForKey:@"Label"]; //it's don't work Out of scope
「ラベル」から NSString にデータを取得するにはどうすればよいですか?