8 Comments
User's avatar
Lee's avatar

the very last example should use "jq -r" instead of "jq -R"

Expand full comment
Tyler Adams's avatar

nice catch, fixed

Expand full comment
Lee's avatar

thanks for the article!

Expand full comment
Anand Gupta's avatar

jqterm.com is a good place to practice jq skills.

Expand full comment
Manuel's avatar

Nice article, very good starting point!

Two inputs that'll come in handy when you use jq all the time:

1. "." is the default query, so instead of `jq '.'` you could just write `jq`.

2. Each occurence of ` | .` in a jq query can be ommited, so the `jq '.k1 | .[0] | .k2 | .[0]'` can be rewritten as `jq '.k1[0].k2[0]'` - for this example, writing the extended version is probably better to explain how it works, but I think it's worth noting that |. can be removed for brevity.

Expand full comment
Joel Mccracken's avatar

The font for your letter l looks like a one to me, e.g. here: “a json array and l >= m, the subarray is returned“

It quite confused me at first

Expand full comment
Tyler Adams's avatar

Thanks for raising this, I changed the font to make it more clear.

Expand full comment
Joel Mccracken's avatar

sure!

Expand full comment