I have a JSON file that I'd like to "overwrite" with data from another JSON, but keep anything that isn't changed. Is there a way to do this out of the box for Azure DevOps pipeline releases? There is a Config transform plugin thingy for it named magic-chunks, but its syntax is really odd and doesn't work properly if I need to overwrite an array.
Destination (JSON that should be "overwritten")
{
"AppSettings": {
"AllowSwaggerRequests": false,
"Secret": "SomeStuff"
},
"Logging": {
"LogLevel": {
"Default": "Debug"
}
}
}
JSON that should be used and added on top of the previous one.
{
"AppSettings": {
"AllowSwaggerRequests": true,
"Secret": "Overwritten"
},
"TestProperty": "Hello World"
}
Expected result:
{
"AppSettings": {
"AllowSwaggerRequests": true,
"Secret": "Overwritten"
},
"Logging": {
"LogLevel": {
"Default": "Debug"
}
},
"TestProperty": "Hello World"
}