How can i select / filter all connection with field.encryptedValueSet is true using jq from JSON data below
{
"connections": {
"connection": [
{
"field": [
{
"id": "url",
"encryptedValueSet": false,
"usesEncryption": false,
"componentOverride": false,
"useDefault": false
},
{
"id": "user",
"encryptedValueSet": false,
"usesEncryption": false,
"componentOverride": false,
"useDefault": false
},
{
"id": "password",
"encryptedValueSet": true,
"usesEncryption": true,
"componentOverride": false,
"useDefault": false
}
],
"id": "3ea89002-51f5-4369-9539-63c3bd406a64",
}
}
]
}
I tried following but not working as desired
jq . | select(.connections.connection[].field[] | .encryptedValueSet==true) EnvironmentExtensions.json
jq . | .connections.connection[].field[] | select(.encryptedValueSet==true) EnvironmentExtensions.json