i have the follwing json string ,can anybody tell me how to get the value of role_name
{"response":"success","user":{"created_at":"2011-11-16T05:48:31Z","ud_id":"1234567890","last_sign_in_ip":"182.72.141.194","updated_at":"2011-11-19T08:58:27Z","account_id":21,"last_name":"dfg","role_name":"Parent","email":"
[email protected]","first_name":"abc"},"status":"200"}
code for
parsing is
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
NSLog(@"resp--- %@",responseString);
NSArray* latestLoans = [(NSDictionary*)[responseString JSONValue] objectForKey:@"user"];
NSDictionary* loan = [latestLoans objectAtIndex:0];
NSString* name = [loan objectForKey:@"last_name"];