Jq Examples: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * jq =Organizatorium= Get the ID of a Amazon API Gateway API with a certain name: <syntaxhighlight lang='json'> aws apigateway get-rest-apis | j...")
 
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
Get the ID of a Amazon API Gateway API with a certain name:
Get the ID of a Amazon API Gateway API with a certain name:


<syntaxhighlight lang='json'>
aws apigateway get-rest-apis | jq -r '.items[] | select(.name == "blue") | .id'
aws apigateway get-rest-apis | jq -r '.items[] | select(.name == "blue") | .id'
 
</syntaxhighlight>
Other:
 
jq -r '.Regions[] | .RegionName'

Latest revision as of 22:28, 10 April 2019

Internal

Organizatorium

Get the ID of a Amazon API Gateway API with a certain name:

aws apigateway get-rest-apis | jq -r '.items[] | select(.name == "blue") | .id'

Other:

jq -r '.Regions[] | .RegionName'