Answer the question
In order to leave comments, you need to log in
What is the point of the JSON.parse method here?
Tell me, please, what's the point of adding JSON.parse(text) here, if the same thing can be done by referring directly to the object?
var text = '{"name":"John Johnson","street":"Oslo West 16","phone":"555 1234567"}';
var obj = json parse(text);
document.getElementById("demo").innerHTML =
obj.name + "
" +
obj.street + "
" +
obj.phone;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question