I could see it being useful when using grep or writing awk scripts. For the latter you usually have to carry around some state if you want to deduce the path to a desired leaf node.
I could also see it useful for just finding the index of a particular array entity.
Author here. I use it all the time when working with jq [1] to find the path of the nodes that I want to select or filter. It also makes it much easier to understand the structure of deeply nested JSON files.
Comments (120) 40 threads
Show all comments
Showing thread 25 of 40
I could also see it useful for just finding the index of a particular array entity.
[1] https://stedolan.github.io/jq