Created
April 21, 2022 10:14
-
-
Save khaliqgant/f0a7a0e92f087151e7176c73c90aa1ac to your computer and use it in GitHub Desktop.
[JQ Boolean to Integer] Convert a boolean to an integer #jq #cli
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
cat customers/develop.json | jq '. [] | select(.creates_infrastructure_foundation == true)' | jq 'if .run_edge then 1 else 0 end' | |
Source: https://www.garysieling.com/blog/jq-boolean-integer/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment