【发布时间】:2015-07-14 14:59:19
【问题描述】:
我有下面的数组
(
(
"id:19",
"name:Virgin Club House Heathrow",
"address:Heathrow Airport, 234 Bath Road, Hayes, Middlesex",
"postcode:UB3 5AP",
"latitude:51.48127",
"longitude:-0.448696"
),
(
"id:20",
"name:Le Bilboquet",
"address:20 E 60th St, New York, United States",
"postcode:NY 10022",
"latitude:40.764072",
"longitude:-73.970834"
)
)
我通过使用
来列举[venuesArray enumerateObjectsUsingBlock:^(NSDictionary* obj, NSUInteger index, BOOL *stop)
{
NSString* tmpStr;
tmpStr = [obj objectForKey:@"id"];
}];
但是我收到此错误 -[__NSCFArray objectForKey:]: unrecognized selector sent to instance 0x7ff26866a690.
【问题讨论】:
标签: json nsarray nsdictionary nsobject