Updating app variable nested properties

I’ve got an app variable defined that loads a list of course modules from json. Each module is an object with 3 properties - Title, Header and Notes.

In each of my module screens i have some labels configured to display the values for the specific module from my list:

This works fine. The problem arises when i want to update my object when leaving the module screen and navigating back to my menu screen:
The module object from my list of modules isn’t updated - it still has its original Title value. What am i doing wrong ?

1 Like

Can you explain more?

You are starting with a JSON string and then you attempt to update this string which you can but if you are not saving the updated JSON then everytime the initialization takes place, the JSON will go back to where it started.

The correct way is to have a variable with the JSON data as string only.

In the screen opens or starts you convert it to object using another variable and then use the object to get or set the values.

You will still need to save the updated JSON if you want to retrieve it later.

1 Like

strange how @muneer isn’t active for a long time… we miss you. I even sent you a message but didn’t respond.
edit:Oh, he’s back

1 Like

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