Skip to main content

JSON-Object-to-String

Command Description

Convert an object into a JSON string

Command Prototype

strJSON = JSON.Stringify(objJSON)

Parameter Description

ParameterRequiredTypeDefaultDescription
objJSONTrueexpression{}The JSON to convert to string

return

strJSON,The variable used to save the output of the command.

Demo

strJSON = JSON.Stringify({"test": 123}) 
TracePrint(strJSON)
/*
"{\"test\" : 123 }"
*/