JSON.stringify
Signature: JSON.stringify(object)
Returns: String jsonString - the String for the given JSON object
Converts the JSON object to a String.
Parameters
| Type |
Name |
Description |
Default |
| Object |
object |
the JSON object to be converted |
|
Example
// Given a JSON object parsed from a string.
var jsonObject = { "name": "Jane Doe", "age": 32, "city": "Somecity" };
// Convert the JSON object to a string.
var jsonStringPlain = JSON.stringify(jsonObject); // expected: {"name":"Jane Doe","age":32,"city":"Somecity"}