# A guide to understanding 'Persistent Context'

**URL:** <https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115>\
**Category:** General\
**Created:** [19 October 2018 10:13 UTC](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115 "2018-10-19T10:13:24Z")\
**Posts on this page:** 1\
**Showing post:** 89

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [4 June 2021 11:03 UTC](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115/89 "2021-06-04T11:03:03Z")

</div>

In case it helps anyone, here is a link to a useful example by @Steve-Mcl  
Also read down that thread to find out about saving a context object by 'reference'

> [@Saving a single value to context](https://discourse.nodered.org/t/saving-a-single-value-to-context/46670/6):
>
> { "192.168.1.10": { "last\_on": 1622751269764, "last\_off": 1622751272068 }, "192.16.1.13": { "last\_on": 1622751772269, "last\_off": 1622751774284 } } Working demo updating the values of the objects properties... [{"id":"4d40b13c.c8309","type":"function","z":"1bd2b382.4dd4f4","name":"setup demo data","func":"msg.payload = {\n \"192.168.1.10\": {\n \"last\_on\": 1622751269764,\n \"last\_off\": 1622751272068\n },\n \"192.16.1.13\": {\n \"las…

---

_[View the full topic](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115)._
