json - Error getting Object from NSDictionary -


i have array below

(     (         "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"     ) ) 

which enumerating through using

[venuesarray enumerateobjectsusingblock:^(nsdictionary* obj, nsuinteger index, bool *stop) {      nsstring* tmpstr;      tmpstr = [obj objectforkey:@"id"]; }]; 

however i'm getting error -[__nscfarray objectforkey:]: unrecognized selector sent instance 0x7ff26866a690.

like said, have array. though block calling objects getting nsdictionary, being given array instead. use nslog print out data type , content of obj debug this.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -