console.log object to json

JavaScript
 console.log(JSON. stringify(obj))  //Read Object 
Source

Also in JavaScript: