Converting an object to JSON notation using JavaScript
The JSON.stringify
method can be used to convert a JavaScript object into a string containing the JSON notation of that object.
JSON.stringify({
"hello": "world"
});
// "{"hello":"world"}"