Dynamic setting nodeDataArray

Hi experts,
my use case is similarly the IVR-Tree example however to set the nodeDataArray dynamic.
The problem is that the dynamic setting is not accepted - so the default content auf the "nodeTemplate’ is shown. If the settings are constant the settings will accepted!
code:

// setting the variabe 'nodeDataArray' :
...
var nodeDataArray = [ "{ instanceName: " + "\"" + Component.getAttribute("name") + "\", " + "icon: " + "\"" + Component.getAttribute("icon") + "\"" + "}" ]; 

//
paletteStates.model.addNodeData( 
{ 
...
subComponents: nodeDataArray // maybe here is the problem ?
} ); 

// The console logging looks good :
![consoleLog|690x22](upload://cGCjfZNhC32qJ9zyAdwss0VGX8G.png)


// Note: if the setting is constant the code runs SUCCESSFULL !
subComponents: [
{ instanceName: "Name1", icon: "./ProcessArchitect_files/App_SelectablePressureLevel_CylMoveOut.svg" }, ]

used Browser MS Edge Version 96.0.1054.57

If you look at the value of nodeDataArray, you will see that it is an Array holding a single long string as its only item. But each GoJS Model requires each item of its Model.nodeDataArray to be a JavaScript Object, not a string.

Also your code would be clearer if you just set the Model.nodeDataArray property.