js.toJson
From Web Computing Documentation
Description
Converts a JavaScript object to a JSON string.
js.toJson( object )
object A JavaScript object.
The function may be used to save object data into the output stream or to display debug messages representing an object.
Examples
var tempResult = Calculate(input); //the Calculate function returns an object var tempResultJson = js.toJson(tempResult); js.output.write("solution", tempResultJson); //js.output.write has a string argument