I'm having a really hard time trying to find a way to iterate through this JSON object in the way that I'd like. I want to separate the token in a variable and the user details in other variables. I'm using only Javascript here.
First, here's the object
{
"token": "517b27a84a4d373a636e323a9572a0ab43883291",
"user": {
"credential_id":"1",
"name":"name",
"password":"password",
"age":"25",
"email":"kalay@peelay.com",
"img_src":"043008thmy.jpg",
"user_type":"0",
"username":"kalay"
}
}