cleancode.in

Flatten JSON into paths

Each value on its own line, with the path that reaches it.

7 values, from an object with 5 keys.

How to read a path

  • tax.rate: the key rate inside tax.
  • tags[0]: the first item of tags; counting starts at 0.
  • ["x-y"]: a key that is not a plain name keeps its quotes.
  • = {}, = []: an empty object, an empty array.

Worked out in your browser: your JSON stays on your screen. Up to 2 MB (2,000,000 bytes) a paste.