Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jq - select objects based on lengths of arrays
# objects with at least one widget and at least one user
$ cat part-r-00000 | jq 'select((.widgets | length) > 0 and (.users | length) > 0)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment