Hi,
I'm trying to achieve the following: Dump paths to leafs and the leaf values.
Example:
$ echo '{"a":{"b":1,"c":2},"d":["x",1]}' | jq '<what to write here?>'
a.b = 1
a.c = 2
d.0 = x
d.1 = 1
I think using the recurse-function it should be possible somehow, any ideas?
It is a bit similar to what
https://github.com/wuyongzheng/json-liner
does, but the output format is more or less fixed there. And using jq I could apply all of jq's filtering possibilities.
Regards,
Tilo