-
-
Save thelebster/ceaedd8a28f4ae266e5fdbf8cbb027ce to your computer and use it in GitHub Desktop.
jq - select objects based on lengths of arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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