How to give default value to dynamically changed json parameter

#1

Hi
In a button’s node-red code I have the json “bgcolor” like the following to be able to dynamically change it

"bgcolor":"{{background}}"

But how to give it a default color before my code update the background value ?
I tried fifferent thing but it doesn’t work:

"bgcolor":"{{background="GREEN"}}"
"bgcolor":"{{background}}="GREEN""
"bgcolor":"{{background}="GREEN"}"

But none of these works !
How to do that ?

#2

See the suggestion I gave you in your other thread