jq

bash cli jq

String Interpolation Example

1
2
echo '{"page": 1, "values": [{"type": "pipeline_variable", "uuid": "{1c0b0da3-7b87-49f6-a855-167d91d1e5f1}", "key": "AWS_ACCESS_KEY_ID", "value": "XXX", "secured": false}, {"type": "pipeline_variable", "uuid": "{11412dd1-226f-4842-bff8-9e109ea33df5}", "key": "AWS_SECRET_ACCESS_KEY", "secured": true}, {"type": "pipeline_variable", "uuid": "{14f24ee9-991d-4eb6-86ef-5aa6ac3f1fa9}", "key": "STACK", "value": "sbx", "secured": false}, {"type": "pipeline_variable", "uuid": "{151fa167-4e2a-4020-9fdd-e8ab56d28d6d}", "key": "ACCOUNT", "value": "sbx", "secured": false}], "size": 4, "pagelen": 4}' | \
jq -r '.values[] | "\(.key): \(.uuid)"'