8 Comments
Jul 1, 2020Liked by Tyler Adams

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

Expand full comment
author

nice catch, fixed

Expand full comment

thanks for the article!

Expand full comment

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

Expand full comment

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

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
author

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

Expand full comment

sure!

Expand full comment