I saved the json
parsing result in a dictionary
which look like:
{
\"statusCode\":\"200\",
\"body\":[
{
\"status\":\"succes
Following will give you the desired object
NSDictionary *dict=[results valueForKeyPath:@"data.abcd"][0];
For individual:
NSString *categoryString=[[results valueForKeyPath:@"data.abcd"][0] objectForKey:@"Category"];
NSString *idString=[[results valueForKeyPath:@"data.abcd"][0] objectForKey:@"id"];
NSString *titleString=[[results valueForKeyPath:@"data.abcd"][0] objectForKey:@"title"];
Also,
NSString *categoryString=dict[@"Category"];
NSString *idString=dict[@"id"];
NSString *titleString=dict[@"title"];
That is an array so use objectAtIndex:
(i.e. [getcat objectAtIndex:0]
or getcat[0]
)
Check like this:
NSString *value=[[[getcate valueForKey:@"abcd"] objectAtIndex:0] valueForKey:@"category"];