0
을 나는이 JSON 메시지 "노드"노드에 액세스하려고 해요
:이 코드는 JSON 메시지에 내부 노드에 액세스 할 수 없습니다 - IOS
{
"nodes": [
{
"node": {
"title": "Jornada del Fútbol Profesional contra el hambre",
"description": "
"image": "",
"fecha": "",
"nid": "",
"noticia_relacionada_1_path": "",
"noticia_relacionada_2_path": "",
"image_small_2": ""
}
}
]
}
:
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
NSDictionary *results = [responseString JSONValue];
NSDictionary *nodes = [results objectForKey:@"nodes"];
결과 사전 1 개의 중요한 결과가 있습니다. 노드 사전에는 10 개의 키 결과가 있습니다. , 사전을
NSString *node = [nodes valueForKey:@"node"];
NSArray *nodeArray = [nodes objectForKey:@"node"];
NSDictionary *nodeDic = [nodes objectForKey:@"node"];
많은 감사
감사합니다. jeremy, 도움이되었습니다. – roof