Question discussion

Which JavaScript method converts a JSON string into a JavaScript object?

1150Medium DSSSB TGT Computer Science 0 replies

Which JavaScript method converts a JSON string into a JavaScript object?

  • AJSON.stringify()
  • BJSON.parse()
  • CJSON.convert()
  • DObject.parse()
Correct answer: B

Explanation

JSON.parse() turns a JSON string into an object; JSON.stringify() does the reverse.

Discussion 0

Nobody has replied yet. Start the discussion!