Created
April 22, 2021 12:48
-
-
Save AndyBold/b705431f6e15496dda0f9e34e37e600b to your computer and use it in GitHub Desktop.
It's easy to select items that have (or do not have) values set for keys. How do you select items that do not have a certain key set?
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
Example: I want to list EIP details for all EIPs that do not have any associations. I.e., they are unused. | |
```shell | |
aws ec2 describe-addresses --region us-west-2 | jq '.Addresses[] | select( has("AssociationId") == false)' | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment