js how to make string an object code example
Example 1: convert string to object javascript
var mystr = '{ "hello":"world" }' // NB: Has enclosing ""
var myobj = JSON.parse(mystr);
Example 2: js string to object
JSON.parse()
var mystr = '{ "hello":"world" }' // NB: Has enclosing ""
var myobj = JSON.parse(mystr);
JSON.parse()