cat <file> | jq -c '.[] | select( .<key> | contains("<value>"))'
cat <file> | jq '.items[0]'
cat <file> | jq '.items[0] | select( .number == 3555 )'
# filter and get specific fields ( url and title)
cat <file> | jq '.items[0] | select( .number == 3555 ) | .url,.title'
Last active
May 31, 2022 20:29
-
-
Save yokawasa/5e843554c610039a13d9e0d76d4b8ab1 to your computer and use it in GitHub Desktop.
jq filter snippets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment