Hello,
I'm new in node-red univers, sorry if I ask basic questions....
I would like to add a new level in the global.json file from a JS function node.
I would like my global.json looks like that :
{
"A":{
"1":{
"info_1":"true",
"info_2":"false",
"info_3":"false"
},
"2":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
}
},
"B":{
"1":{
"info_1":"true",
"info_2":"false",
"info_3":"false"
},
"2":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
}
}
}
How can I add new level in this file like for exemple a third level in "A" ?
"3":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
}
To have :
{
"A":{
"1":{
"info_1":"true",
"info_2":"false",
"info_3":"false"
},
"2":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
},
"3":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
}
},
"B":{
"1":{
"info_1":"true",
"info_2":"false",
"info_3":"false"
},
"2":{
"info_1":"false",
"info_2":"false",
"info_3":"true"
}
}
}
Hoping to have been clear...
Thank you
Sorry for my English, I'm French..