jq Cheat Sheet

Example-wise the jq manpage is just useless. Let's document some simple examples here...

Simple Extraction

Extract only some attributes from a list of objects

jq '.[] | {attribute1, attribute2}'

Filter this by attribute

jq '.[] | select(attribute1 == "") | {attribute1, attribute2}'