I am new to the world of programming, I need help to transform one JSON file to another format using python. The Input file has a key and a value variable which I need to transform so that the output file has values. Pls(refer below) :
Input File :
[
{
"variable_type": "env_var",
"key": "TEST_VARIABLE_1",
"value": "TEST_1",
"protected": false,
"masked": true,
"environment_scope": null
},
{
"variable_type": "env_var",
"key": "TEST_VARIABLE_2",
"value": "TEST_2",
"protected": false,
"masked": false,
"environment_scope": "*"
}
]
Output file:
{
"TEST_VARIABLE_1":"TEST_1",
"TEST_VARIABLE_2":"TEST_2"
}