Live data from Hacker News

FX: An interactive alternative to jq to process JSON

github.com

1–10 of 65 posts

Re: FX: An interactive alternative to jq to process JSON

#5
post #3

Apparently, the author wrote this tool because jid was struggling with a 7MB JSON file. See https://github.com/simeji/jid/issues/66#issuecomment-4436718...

Just tried out both of these for a large endpoint.

- FX "expand/collapse" functionality seems way better for exploring APIs whose shape you don't know

- jid is maybe marginally better for APIs where you have instant recall of the exact shape and need to rapidly query it

Overall, I like FX better because it provides feedback on your query faster.

I am grateful to the author(s) for creating it and I'll be using it instead of JQ whenever I need to wrangle APIs from the CLI.

Re: FX: An interactive alternative to jq to process JSON

#10
post #9

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}]?

Yeah I too found the syntax somewhat unintuitive at times. But to answer your question, you would do 'map(.k1)'
Post reply on HN