JSON.parse()

A method that converts valid JSON text into a JavaScript value.

What does JSON.parse() do in JavaScript?

JSON.parse() — A method that converts valid JSON text into a JavaScript value.

const text = '{"item":"tea"}';
const order = JSON.parse(text);

Level: Journeyman · More JavaScript terms at this level

Updated