Hey PierceNg,
jq is not just a JSON pretty-printer. It has a query language. Here's an example of jq's query/filter language that extracts data of interest from the deeply-nested JSON returned by AWS EC2 'describe-instances' API call:
I'm aware of the capabilities of
jq, since I have it installed on my machine and have used the filtering side of it many times in the past.
If I can draw a parallel into a GUI side of things, what you're asking me is to have a
TEdit, somewhere, in which one types some
XPath /
jq filtering and the tree and JSON tabs react to it like the filter from
jq, right?
I guess I can create an issue with that feature request, if it gathers momentum and wide support.
I think the
XPath only can be done rather quickly, but I'm not gonna copy
jq's behaviour. That would be re-inventing the wheel.
In regards to any
jq related filtering, I would do a call to it and that would mean an external dependency for Linux and I'm not even sure if
jq is supported on Windows.
Food for thought...
But from my understanding,
jq is a good tool to use in scripts. What would you do with a filtered result? Copy/Paste? Rather lengthy, IMO.
If someone can give me a few good examples where a trimming of the full data with, either, an
XPath or a
jq type filter would make sense on a GUI, I'll then try to implement it, I guess.
Cheers,
Gus