What is the purpose of the "JSON.parse()" method in JavaScript?
-
A
Parsing XML documents
-
B
Parsing JSON strings into JavaScript objects
Correct answer
-
C
Creating JSON strings from JavaScript objects
-
D
Concatenating strings
Correct answer
B. Parsing JSON strings into JavaScript objects
16 views
Explanation
"JSON.parse()" is used to convert a JSON-formatted string into a JavaScript object.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ