I have an array in the following format:
agendaItems = [{"topic":"blah", "description:"blah"}, {"topic":"blah2", "description":"blah2"}].
I need to update the values in this array in a handler and handler does not allow global variables to be modified. I know I have to use either CacheService or ScriptProperties. However, I can't seem to make it work:
If I use CacheService, I get something like this: "[object oject][object object]"
CacheService.getPublicCache.put('agenda', agendaItems);
If I use ScriptProperties, I get something like this: ""[Ljava.lang.Object;@429bd3a7"
ScriptProperties.setProperty('agenda', agendaItems');
Am I doing this wrong or is there a better way? Any advice is appreciated.