Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Read JSON attributed in session storage Data Element

Avatar

Level 3

Hi,

In Launch have a Data element of type session Storage, when i do  _satellite.logger.log('mySessionStorageJsonObject', _satellite.getVar("mySessionStorageJsonObject")), i see an JSON object like {"userName":"John_Doe",
"region":"flooded"}.

how do i read/push the region value into another DataElement? when i do var

myJson = _satellite.getVar("mySessionStorageJsonObject") and then do var region = myJson.region or region = myJson[region] or region = myJson['region'] are all not working.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Nevermind, i figured it out. var userDetailsJsonParse = JSON.parse(myJson) did it for me;

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

Nevermind, i figured it out. var userDetailsJsonParse = JSON.parse(myJson) did it for me;