# Storing data changed from 1.0x?

**URL:** <https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260>\
**Category:** General\
**Created:** [25 February 2020 22:40 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260 "2020-02-25T22:40:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [25 February 2020 22:40 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/1 "2020-02-25T22:40:31Z")

</div>

Today i updated a 0.20 version to the newest.  
All went well until i started testing my script.  
I stored data with a point in the name "msg.client" in the past this was working but now it doesnt.  
is that a setting thing or new way of working?  
Just a little scared now to update another 45 pi's

---

<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:** [25 February 2020 23:07 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/2 "2020-02-25T23:07:33Z")

</div>

Hi @RogierQ

can you be a little more specific? How are you storing the data?

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [25 February 2020 23:21 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/3 "2020-02-25T23:21:39Z")

</div>

Sure!  
What i did was  
global.set(“msg.client”,client);  
Were client was an object  
In the new version it was in the context saved as “msg” and returned as object of object client if i say it correct. Still learning objects and array and things

---

<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:** [25 February 2020 23:31 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/4 "2020-02-25T23:31:30Z")

</div>

I thought we always treated keys like `msg.client` as the `client` property of the object `msg`... so I'm slightly surprised it appears to have changed for you.

But yes, keys with `.` in them are treated as being multi-level objects.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [27 February 2020 09:46 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/5 "2020-02-27T09:46:28Z")

</div>

Can you tell me a little more about multi level objects?  
When i google it i do not understand what it exactly means  
O do you have a link to a good explanation?  
Thanks!

---

<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:** [27 February 2020 10:01 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/6 "2020-02-27T10:01:49Z")

</div>

When it sees a key with the value `"msg.client"`, rather than treat that as a single identifier, it splits it up to be the `client` property of the `msg` object. In exactly the same way as it would when you use something like `msg.client` in regular JavaScript code.

For example, if you did:

```auto
global.set("msg.client", "123");

```

You end up with an object called `msg` with a property called `client` and a value of `"123"`:

```auto
{
   msg: {
      client: "123"
   }
}

```

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [27 February 2020 10:13 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/7 "2020-02-27T10:13:37Z")

</div>

Ooo hahaha i was making it way more difficult 😉  
Thanks for explaining

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 April 2020 10:13 UTC](https://discourse.nodered.org/t/storing-data-changed-from-1-0x/22260/8 "2020-04-27T10:13:44Z")

</div>

Closed on 27 April 2020 10:13 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
