JQ syntax feels too unusual, doesn't resemble known code, gives me the feeling of looking into cryptic Perl or regex, could never remember the simplest things. For example how would you take key k1 from a list of dicts [{k1: v1, k2: v2}, {k1: v3}]?
FX: An interactive alternative to jq to process JSON
11–20 of 65 posts
Re: FX: An interactive alternative to jq to process JSON
#12Re: FX: An interactive alternative to jq to process JSON
#13If you want to use jq but with Python syntax, I wrote pq: https://github.com/dvolk/pq
But then I discovered LINQPad[0] and, "The Legendary Dump".
Re: FX: An interactive alternative to jq to process JSON
#14JQ syntax feels too unusual, doesn't resemble known code, gives me the feeling of looking into cryptic Perl or regex, could never remember the simplest things. For example how would you take key k1 from a list of dicts [{k1: v1, k2: v2}, {k1: v3}]?
I agree that jq's query language is very obtuse and probably my biggest barrier towards learning it. I have found great mileage using gron [1], which is very different from jq, but its goal is to promote exploration of a JSON file through common unix tools such as awk and grep. 1: https://github.com/tomnomnom/gron
Re: FX: An interactive alternative to jq to process JSON
#15JQ syntax feels too unusual, doesn't resemble known code, gives me the feeling of looking into cryptic Perl or regex, could never remember the simplest things. For example how would you take key k1 from a list of dicts [{k1: v1, k2: v2}, {k1: v3}]?
And by the way, you can achieve live preview with any of these CLI tools by using fzf. This is the snippet for jql for example: `echo '' | fzf --print-query --preview-window wrap --preview 'cat test.json | jql {q}'` (substitute jql for jq or anything else)
P.S.: jql might seem dead, as there are no recent commits, but it's not. It's just finished.
Re: FX: An interactive alternative to jq to process JSON
#16This simply evals the argument. Not an alternative to jq. fx “code to eval”
If you are, then why comment?
Re: FX: An interactive alternative to jq to process JSON
#17JQ syntax feels too unusual, doesn't resemble known code, gives me the feeling of looking into cryptic Perl or regex, could never remember the simplest things. For example how would you take key k1 from a list of dicts [{k1: v1, k2: v2}, {k1: v3}]?
I agree that jq's query language is very obtuse and probably my biggest barrier towards learning it. I have found great mileage using gron [1], which is very different from jq, but its goal is to promote exploration of a JSON file through common unix tools such as awk and grep. 1: https://github.com/tomnomnom/gron
Thanks for that tip!
Re: FX: An interactive alternative to jq to process JSON
#18Apparently, the author wrote this tool because jid was struggling with a 7MB JSON file. See https://github.com/simeji/jid/issues/66#issuecomment-4436718...
shuf -n 1000 file
This is part of coreutils.
There's also jiq, which is a clone of jid (mentioned elsewhere) but with jq syntax
Re: FX: An interactive alternative to jq to process JSON
#19Re: FX: An interactive alternative to jq to process JSON
#20Quoted post unavailable.