2012-07-28 4 views
0

Flickr API에 대한 쿼리를 수행하고 사전을 포함하는 NSArray를 반환했습니다. 어떻게 접근 할 수 있을지 궁금 해서요. 배열의 _content 항목이 다시 전송되었습니다.NSArray 내의 NSDictionary 멤버 항목에 액세스하십시오.

NSArray *topPlaces = [FlickrFetcher topPlaces]; 
NSLog(@"%@",topPlaces); 

(
    { 
    "_content" = "London, England, United Kingdom"; 
    latitude = "51.506"; 
    longitude = "-0.127"; 
    "photo_count" = 3061; 
    "place_id" = "hP_s5s9VVr5Qcg"; 
    "place_type" = locality; 
    "place_type_id" = 7; 
    "place_url" = "/United+Kingdom/England/London"; 
    timezone = "Europe/London"; 
    woeid = 44418; 
}, 
    { 
    "_content" = "New York, NY, United States"; 
    latitude = "40.714"; 
    longitude = "-74.007"; 
    "photo_count" = 1886; 
    "place_id" = ".skCPTpTVr.Q3WKW"; 
    "place_type" = locality; 
    "place_type_id" = 7; 
    "place_url" = "/United+States/New+York/New+York"; 
    timezone = "America/New_York"; 
    woeid = 2459115; 
}, 
    { 
    "_content" = "Weston-Super-Mare, England, United Kingdom"; 
    latitude = "51.346"; 
    longitude = "-2.977"; 
    "photo_count" = 945; 
    "place_id" = HWdHmQdVUrptMA; 
    "place_type" = locality; 
    "place_type_id" = 7; 
    "place_url" = "/United+Kingdom/England/Weston-Super-Mare"; 
    timezone = "Europe/London"; 
    woeid = 40016; 
}, 

)는 일 @Sascha

답변

0

그냥 그렇게

for (NSDictionary *dictionary in topPlaces) { 
    NSLog(@"%@", [dictionary objectForKey:@"_content"]); 
} 
+0

감사처럼 NSArray를 반복! – tawheed

관련 문제