Created
June 18, 2014 16:24
-
-
Save jimjh/a0128f1630574ff964e6 to your computer and use it in GitHub Desktop.
jq - select objects based on lengths of arrays
This file contains 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