Storing data changed from 1.0x?

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

Hi @RogierQ

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

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

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.

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!

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:

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

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

{
   msg: {
      client: "123"
   }
}

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

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