I have a very complex JSON data. And I tried to parse using objective c programming. The JSON data looks like the following (Here, I presented the simple format to explain. But it has very deep leveling):
{
"university": "CUNY",
"results": {
"Engineering": 200,
"Computer Science": 298,
"Life Science": 28
}
}
Using NSJSONSerialization, I tried to solve this and I use the following code:
NSDictionary *parsedObject = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
[parsedObject objectForKey:@"results"];
And getting the result. But I need a dictionary like myResultDict which will be made form the results so that I can implement other functionality.
Can anybody give me a small hint how to do that?
NSDictionary *parsedObject != niland then report the error (which you have set toNULL).