0
을 :으로 반복 및지도 JSON 사전 객체의 배열 구축 - 내가 JSON 웹 서비스에서이 응답에게있어 목표 C
categoria = (
{
"id_categoria" = 61;
imagen = "http://exular.es/mcommerce/image/data/ipod_classic_4.jpg";
nombre = Gorras;
},
{
"id_categoria" = 59;
imagen = "http://exular.es/mcommerce/image/data/ipod_touch_5.jpg";
nombre = Camisetas;
},
{
"id_categoria" = 60;
imagen = "http://exular.es/mcommerce/image/data/ipod_nano_1.jpg";
nombre = Pantalones;
}
);
}
그것은 코드의이 작품에서 사전에 공급된다
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
//data =nil;
NSLog(@"JSNON %@", responseString);
NSDictionary *results = [responseString JSONValue];
NSLog(@"JSNON %@", results);
나는 사전에있는 모든 범주를 반복하고 "속성"이름 "과 이미지 카테고리 개체를 포함하는있는 NSArray를 작성해야합니다.
많은 감사
감사합니다. Bill, 매우 도움이되었습니다. – roof