When combining multiple jq filters, you can use jq’s inbuilt pipe |
operator instead of shell pipes.
i.e., instead of this:
curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[]' | jq 'select(.address.city == "South Christy")' | jq '{name, username, email}'
You can do this:
curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[] | select(.address.city == "South Christy") | {name, username, email}'