Created
April 21, 2023 17:35
-
-
Save joanna-liana/3067ef45f0904f03cc621786bbc31e9c to your computer and use it in GitHub Desktop.
Logging a deeply nested object without JSON.stringify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nested = { a: { b: { c: { d: 1 } } } }; | |
// { a: { b: { c: [Object] } } } | |
console.log(nested); | |
// { | |
// a: { b: { c: { d: 1 } } } | |
// } | |
console.log( | |
util.inspect(nested, { depth: null, colors: true }) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment