0 votes
in JSON by
What is the use of JSON.parse in JavaScript?

1 Answer

0 votes
by

It is used to parse the data present inside the JSON into objects for using its values.

The syntax used to parse JSON data:

string json = ‘{

"Brand": "Hyundai",

"Name": "Verna",

"Color": “Red”

}’

var obj = JSON.parse(json);

This will convert JSON data into the object from which we can retrieve the data for use with the application.

Related questions

0 votes
0 votes
asked Nov 4, 2020 in JSON by rahuljain1
0 votes
0 votes
asked Jul 20, 2020 in JSON by Robindeniel
+1 vote
asked Feb 10, 2020 in Big Data | Hadoop by miceperry
...