4 ms·
So, I don't really understand. but! Suppose you have a JSON file like this: [ { "a": 1, "b": 2 }, { "a": 5, "b": 6 }
by ldd 6y ago
So, I don't really understand. but!
Suppose you have a JSON file like this:
[
{
"a": 1,
"b": 2
},
{
"a": 5,
"b": 6
},
]
what exactly do you want to do with it?
- originalvichy 6y agoIf I was to click on the part that saus ’”b”:2’, could you show me the jq query I could use to get just that part of the json file? Kind of similar to how some Git extensions show who has the last commit on a certain line of code when you click/place cursor on a line
- ldd 6y agoGotcha. I'd honestly also would want this, but I don't see an easy way of implementing it. It sort of makes me wonder how xpath queries work and what algorithms are used. At face value, for certain JSON files, it is probably possible to do quickly, like in my example above, but the devil is always in the details...