$ any-command-that-outputs-json | node --inspect-brk --eval 'const chunks = []; process.stdin.resume().setEncoding("utf8").on("data", d => chunks.push(d)).on("end", () => {const result = JSON.parse(chunks.join("")); debugger;})'
Usage
- Execute the one-liner above.
- Open
chrome://inspect and attach to the debugger by clicking the inspect link.
- On inspector, press
F8 once to proceed a step.
- You'll get a variable named
result that is a parsed object from the command.
See also
Top comments (0)