turn object to json javascript

JavaScript
var person={"first_name":"Tony","last_name":"Hawk","age":31};
var personJSONString=JSON.stringify(person); 
Source

Also in JavaScript: