jq
Just a collection of jq things I’ve found useful
Arrays
Get an array element by index
echo '[1, 2, 3, 4, 5]' | jq '.[0]' # => 1
Get the length of an array
echo '[1, 2, 3, 4, 5]' | jq 'length' # => 5
Just a collection of jq things I’ve found useful
echo '[1, 2, 3, 4, 5]' | jq '.[0]' # => 1
echo '[1, 2, 3, 4, 5]' | jq 'length' # => 5