What is the value of obj in the following code?
var obj = JSON.parse('{"fruit": "Apple"}', function(k, v) { if (v == "Apple") return "Orange" else return v; });
{ "fruit" : "Apple"}
{ "fruit" : "Orange"}
{"Orange"}
{"Apple"}
Correct Answer : B
What is a JSONStringer used for?
Which statement about the replacer parameter in JSON.stringify() is true?
Which of the following is a valid JSON string?