# "change node" Variables in key

**URL:** <https://discourse.nodered.org/t/change-node-variables-in-key/4248>\
**Category:** General\
**Created:** [24 October 2018 09:08 UTC](https://discourse.nodered.org/t/change-node-variables-in-key/4248 "2018-10-24T09:08:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 October 2018 09:14 UTC](https://discourse.nodered.org/t/change-node-variables-in-key/4248/2 "2018-10-24T09:14:52Z")

</div>

Hi @Little - no, it isn't possible to do that.

If you were getting a value from context, then you could use a JSONata expression, as I described in this topic - [How to use msg.payload as an index in a change node?](https://discourse.nodered.org/t/how-to-use-msg-payload-as-an-index-in-a-change-node/4215)

But you want to set a value in context... there's no convenient way of doing that in a Change node today. You'd have to use a Function node:

```auto
flow.set("store.mode_"+msg.payload.index,msg.enabled);
return msg;

```

---

_[View the full topic](https://discourse.nodered.org/t/change-node-variables-in-key/4248)._
