Sample input.json
[{
"organizationId": "org1",
"runtimeVersion": "3545",
"type": "rest-api",
"server": "test1",
"status": "UP"
}]
Expected output.json
[{
"organizationId": "org1",
"runtimeVersion": "3545",
"type": "rest-api",
"server": "test1",
"status": "UP",
"test1": "UP"
}]
The input is an array object. I need to add new key which is the value of key server. The value of this new key should value of the key status.
Any solutions on achieving this using jq