Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
I_am_tiberius
· 5y ago · 0 comments
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.
Comments
[–]
sdfhbdf
5y ago
Have you tried `jq`?
https://stedolan.github.io/jq/
Maybe you can skip a step with pasting online.
[–]
rivn
5y ago
do you know about util.inspect?
https://nodejs.org/api/util.html#util_util_inspect_object_sh...
[–]
I_am_tiberius
OP
5y ago
I did not. Thanks!