jq
Tips and tricks for working with the jq command line utility
Install
brew install jqExample output
aws ec2 describe-security-groups
{
"SecurityGroups": [
{
"Description": "default VPC security group",
"GroupName": "default",
"IpPermissions": [
{
"IpProtocol": "-1",
"IpRanges": [],
"Ipv6Ranges": [],
"PrefixListIds": [],
"UserIdGroupPairs": [
{
"GroupId": "sg-0494280510832e7b2",
[snip] View All Elements for a Key
View All Elements for a Sub-Key
Convert Output into Colorized JSON
View Certain Keys
Key is Exactly
Key Contains
Return Keys After Filtering
Last updated