4 ms·
Very important for backend is %j (e.g.: console.log('%j', variable); which can output complex json objects to the terminal. I often write it to the terminal and
by I_am_tiberius 6y ago
Very important for backend is %j (e.g.: console.log('%j', variable); which can output complex json objects to the terminal. I often write it to the terminal and then copy it to an online json viewer so it is formatted in a viewable format.
- sdfhbdf 6y agoHave you tried `jq`? https://stedolan.github.io/jq/ https://stedolan.github.io/jq/ Maybe you can skip a step with pasting online.
- rivn 6y agodo you know about util.inspect? https://nodejs.org/api/util.html#util_util_inspect_object_showhidden_depth_colors https://nodejs.org/api/util.html#util_util_inspect_object_sh...
- I_am_tiberius 6y agoI did not. Thanks!