Skip to content

Instantly share code, notes, and snippets.

@devarajchidambaram
Created October 19, 2019 10:25
Show Gist options
  • Save devarajchidambaram/9efb68ace5c38a8fe53fee35f571e945 to your computer and use it in GitHub Desktop.
Save devarajchidambaram/9efb68ace5c38a8fe53fee35f571e945 to your computer and use it in GitHub Desktop.
print object in nodejs
const myObject = {
"a":"a",
"b":{
"c":"c",
"d":{
"e":"e",
"f":{
"g":"g",
"h":{
"i":"i"
}
}
}
}
};
console.log(myObject);
//Instead
console.log(JSON.stringfy(myObject))
//Or better
console.log(util.inspect(myObject))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment