Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndyBold/b705431f6e15496dda0f9e34e37e600b to your computer and use it in GitHub Desktop.
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?
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