I have found some weirdness with trying to write to arrays and associative arrays that are members of a node.
Try making a copy of the array, then updating it, then assigning the entire copied array to the field.
Right, that won’t work as expected. The reason being that when you access RSG node field, a copy is being made and that’s what the operation works on. The globalNode is a Node - and even as using dot-notation seems like a garden-variety assoc.array access - it isn’t. It does not return “the” references to the stored object, it returns “a” reference to a deep-copy of it - with all consequences from that, like being unable to mutate the original or the copy being slow.
When evaluating above expression globalNode.accessToken.Push("testing_123"), first a copy of accessToken content is made, then .push() is called on it, which appends the new value - and on completion of the operation, the array is dropped (de-referenced and thus GC’d), as if that call were .push(“testing_123”).
There is no single elegant workaround. Depending on the use case, sometimes it’s better to replace nested structures of roArray/roAA with hierarchical Node structures. I.e. translate roAA into node fields (cue addFields()) and roArray into children (cue addChildren()).