When I parse my Json file on execution of this line
model.userProfileObj.userFirstName = [NSString stringWithFormat:@"%@",[[responseDict valueForKey:@"Profile"] valueForKey:@"first_name"]];
Profile is my dictionary and first_name its inner variable. like:
[
{
"Profile": {
"id": "13",
"user_id": "13",
"first_name": "Myname",
"profile_image": "13-IMG_169.png",
}
}
]
Assign the following string to model.userProfileObj.userFirstName but I need MyName only not ( and ” in variable.
(
"Myname"
)
Your result in
responseDictis in array format and you are using it as dictionary thats why you are getting result like thisso just do one thing in your code..
[responseDict objectAtIndex:0]Your code