JSON.stringify()
noun
say it: “JAY-sun STRING-ih-fy” /ˈdʒeɪsən ˈstrɪŋɪfaɪ/
The JavaScript method that turns a value into JSON text, for sending in a request.
What does JSON.stringify() do in JavaScript?
JSON.stringify() — A method that converts a supported JavaScript value into JSON text.
const order = { item: "tea" };
const text = JSON.stringify(order);
In a sentence
- “JSON.stringify(order) turned the order into text for the POST body.”
Level: Journeyman · More JavaScript terms at this level
Updated