cocoa - Objective C, NSDictionary loop through each object -
i new facebook developer. want create mac osx application using facebook api. when request fql , return me json data below:
my code:
[self.result_text setstring:[nsstring stringwithformat:@"%@",[result objectforkey: @"result"]]; it display:
[{"name":"my name","first_name":"my first name","last_name":"my last name"}] i want read object inside dictionary. example want display "my name" string. don't know how it.
thanks,
as ashley mills wrote, should check documentation. can loop through dictionary keys this:
for ( nsstring *key in [dictionary allkeys]) { //do want items nslog(@"%@", [dictionary objectforkey:key]); } hope helps
Comments
Post a Comment