I'm a frontend developer, and I'm unfamiliar with command line tools for Node.js
I currently use iTerm with zShell, but I can't find any resources online about folding console output (similar to how the Chrome console formats objects). I tried using fx but can't seem to pipe and utilize the Node output through the util.
node -e 'console.log({ a: { b: 2 } })';
node -e 'console.log(JSON.stringify({ a: { b: 2 } }, null, 2))';
For large network objects, it would be much more convenient to fold the nested layers. It would also be great to have syntax highlighting.
Is there an easy way to debug Node.js console output JSON?
Am I missing fundamental CLI tools? I know this is a relatively open-ended question, but I think it would be a good resource for other people in my situation (I've spent ~3 hours researching with barely any improvement).
Thanks