stringToObject

converts a json formatted string to an object

Syntax

stringToObject(json)

Returns

returns (object)

Parameters

json (string)
in json format

Usage

function TestJSON(){
  // converts to and back; a JSON object to a string
  var json_string = "{ \"prop1\" : \"value1\" }";
  var json = stringToObject(json_string);
  json["prop2"] = "value2";
  echo(objectToString(json));
  }