# How to give default value to dynamically changed json parameter

**URL:** https://discourse.nodered.org/t/how-to-give-default-value-to-dynamically-changed-json-parameter/859
**Category:** General
**Created:** [16 June 2018 19:49 UTC](https://discourse.nodered.org/t/how-to-give-default-value-to-dynamically-changed-json-parameter/859 "2018-06-16T19:49:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hary/32/12340_2.png) [@hary](https://discourse.nodered.org/u/hary)
#### Post date: [16 June 2018 19:49 UTC](https://discourse.nodered.org/t/how-to-give-default-value-to-dynamically-changed-json-parameter/859/1 "2018-06-16T19:49:59Z")

</div>

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

```auto
"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:

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

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

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

But none of these works !  
How to do that ?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [16 June 2018 20:46 UTC](https://discourse.nodered.org/t/how-to-give-default-value-to-dynamically-changed-json-parameter/859/2 "2018-06-16T20:46:35Z")

</div>

See the suggestion I gave you in your other [thread](https://discourse.nodered.org/t/how-to-alternatively-change-buttons-color/820/10)
