2 ms·
This is an amazing article. I think the two things that set it apart is (a) showing the process of building a complex command from scratch step by step, and (b)
by lalaithion 5y ago
This is an amazing article. I think the two things that set it apart is (a) showing the process of building a complex command from scratch step by step, and (b) actually using a real API endpoint to start with.
One convenient tip I discovered after reading this article and trying out the command is that
jq 'map({ title: .title, number: .number, labels: .labels | length }) | map(select(.labels > 0))'
can be refactored into
jq 'map({ title: .title, number: .number, labels: .labels | length } | select(.labels > 0))'
or in other words, map(filter1) | map(filter2) == map(filter1 | filter2).