0

I have this reponse as JSON object.

Object {auth_token: "60a483bc0b1bc4dc0231ff0b90a67be1dad6ef45"} auth_token:"60a483bc0b1bc4dc0231ff0b90a67be1dad6ef45" proto : Object

I want to extract "60a483bc0b1bc4dc0231ff0b90a67be1dad6ef45" from this object. How can I do that?

1 Answer 1

1

If you've assigned that response to a variable:

var someObject = {auth_token: "60a483bc0b1bc4dc0231ff0b90a67be1dad6ef45"};

You can extract the value by using object.key notation

var valueForKey_auth_token = this.someObject.auth_token;

console.log("valueForKey_auth_token", valueForKey_auth_token);

And you'll see this on the console

valueForKey_auth_token 60a483bc0b1bc4dc0231ff0b90a67be1dad6ef45
Sign up to request clarification or add additional context in comments.

1 Comment

Oh! Thank you very much! I got it! :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.