Using jq

This documentation is a great example of a Tech Rant – useless.



E.g. a list of AWS Cloud Config Rules.

aws configservice describe-config-rules


Let’s understand the format of the JSON before delving further.

Best intro by far is from

  • data is in name / value pairs
  • data is separate by commas
  • {} hold objects
  • [] hold arrays

So, we have an object with name = ConfigRules and then a value which is an array of objects.

What we want are the values of those objects where the name is ConfigRuleName.


The Manual ( says:

Section 3: Basic filters

Array/Object Value Iterator: .[]

which returns all the elements of an array.


aws configservice describe-config-rules | jq '.ConfigRules[].ConfigRuleName'

This helped:




Pulling out the commit message and name from a github repo: 

Note: message:is just the variable name. It could be my_message:. It’s a coincidence that it’s the same as the value in the github commit.