I have the following json structure for image:
{"image": [
{
"bytesize": "-2",
"default": "redlight_drdefault"
},
{
"active": "JV77tdMcHkChFaF2H9uoDHepPhUcrlprYEsQr-r-1lg=",
"bytesize": "566806"
}
]}
I want to change the the field named "active" to "inactive" without changing the value stored in the field like the following:
{"image": [
{
"bytesize": "-2",
"default": "redlight_drdefault"
},
{
"inactive": "JV77tdMcHkChFaF2H9uoDHepPhUcrlprYEsQr-r-1lg=",
"bytesize": "566806"
}
]}
Do anyone has the solution how to do this??If u can show this on playground it will be great.
I am having difficulty in appending new value which is:
mapactive := map[string]string{"active": "gj65vn768=",
"bytesize":"76878768" }
How to append this to the solutions provided to me???This should be appended at the end of making all active keys inactive.