Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (7k points)

How can I parse Json in JavaScript?

1 Answer

0 votes
by (13.1k points)

The standard method of parsing JSON in JavaScript is JSON.parse()

You can do something like this:

const json = '{ "fruit": "pineapple", "fingers": 10 }';

const obj = JSON.parse(json);

console.log(obj.fruit, obj.fingers);

Want to be a full stack developer? Check out the full stack developer course from Intellipaat. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.9k answers

507 comments

693 users

...