JQ Cheatsheet

Loop over JSON array

This example will print all of the values associated with the name key:

sample='[{"name":"foo"},{"name":"bar"}]'
for row in $(echo "${sample}" | jq -r '.[] | @base64'); do
    echo ${row} | base64 --decode | jq -r '.name'
done

Resource: https://www.starkandwayne.com/blog/bash-for-loop-over-json-array-using-jq/