Created
June 18, 2019 11:54
-
-
Save pierric/e4d146f4d24c725d3a39a7094c4bfaf5 to your computer and use it in GitHub Desktop.
Find all node of some name, and deduplicated the values.
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
# list all the color node in the json file (recursively) | |
python -m jsmin <json_file> | jq '.. | .color? | select (. != null) | keys | .[]' | |
# list all and remove duplicated items. | |
python -m jsmin <json_file> | jq '[.. | .color? | select (. != null) | keys | .[]] | unique | .[]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment