guys.
I need to replace all occurrences of a string with a different string in the whole body of a JSON in JQ.
Say in the following input JSON I want to replace the string "DEV" with "INT". How could I do this in JQ?
Input JSON:
{
"startIndex":0,
"vXPolicies":[
{
"policyName":"DEVXPolicyDEF",
"tables":"DEVX_DE_DEF"
},
{
"policyName":"DEVXPolicyABC",
"tables":"DEVX_DE_ABC"
}
]
}
Desired output JSON:
{
"startIndex":0,
"vXPolicies":[
{
"policyName":"INTXPolicyDEF",
"tables":"INTX_DE_DEF"
},
{
"policyName":"INTXPolicyABC",
"tables":"INTX_DE_ABC"
}
]
}
Thank you!