I’m trying to parse this JSOn with multiple entries of “node” tag:
{
"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":
}
}
]
}
Here is the code:
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
//data =nil;
NSDictionary *results = [responseString JSONValue];
NSArray *noticias = [results objectForKey:@"node"];
self.noticiasArray = [[NSMutableArray alloc] init];
for (int i = 0; i < [noticias count]; i++) {
news *noticia = [[news alloc] initWithDictionary:[noticias objectAtIndex:i]];
[self.noticiasArray addObject:noticia];
noticia=nil;
}
I got 10 elements in the notices array, but when I try to get the inner values in the initWithDictionary: they are always null.
Many thanks
Example: