NSString *responseString = [request responseString];
NSDictionary *dictionary=[responseString JSONValue];
NSArray *dic=[dictionary valueForKey:@"data"];
for (int a=0; a<dic.count; a++) {
NSInteger z=(NSInteger)a;
NSLog(@"%@",[[dic objectAtIndex:a] objectForKey:@"nom"]);
}
this is the file
{"data":[ "",{"id":"1","nom":"hello","message":["",{"id":1,"nom":"dad"}]}, {"id":"2","nom":"hi","message":["",{"id":"1","nom":"marie"},{"id":"2","nom":"bob"}]} ] }
When I want to parcour my json file, I saw the problem whith variable "a" in objectAtIndex because it's an integer, but if I try value 5 for exemple it's work's perfect.
Can you help me please.
"") and that is the problem (you try to get a value like it was a dictionary)