Changing Property of a Copied Node

Node
As in the above image Start1 node is a copy of Start0 node.

Buttons of each node are stored in itemArrays called ButtonArray .
Every Time i try to update button 0 name of start0 node , button 0 of start 1 node also gets updated

the way im updating is

var buttonarray = node.data.nodeArray[val];//val is the selected button index to get the array.
//var data = port.data;
myDiagram.model.setDataProperty(buttonarray, “text”,document.getElementById(‘textField’).value;

both nodes keys are different but from what i noticed each button array has same value for a property called “buttonarray.__gohashid”.

Im copying the node by using ctrl+c and pasting by using ctrl+v .

how can i solve this?Should i copy the node in a different way or am i missing any property? Please help

complete node template is

myDiagram.nodeTemplateMap.add(“decisionTree”,
$(go.Node, “Table”,
{ locationObjectName: “BODY”,
locationSpot: go.Spot.Center,
selectionObjectName: “BODY”,
selectionAdornmentTemplate:
$(go.Adornment, “Auto”,
$(go.Shape, “Rectangle”,
{ stroke: “dodgerblue”,
strokeWidth: 3,
fill: null }),
$(go.Placeholder)
),
},
new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify),

// the body
$(go.Panel, “Auto”,
{ row: 1, column: 1, name: “BODY”,
stretch: go.GraphObject.Fill },
$(go.Shape, “Rectangle”,
{ fill: bluegrad,
minSize: new go.Size(56, 56) }),
$(go.TextBlock,
{ margin: 10, textAlign: “center”,isMultiline:true, wrap:go.TextBlock.WrapFit,width: 80 },
new go.Binding(“text”, “maintext”)),
$(go.TextBlock,
{ margin: 10, textAlign: “center”,visible:false },
new go.Binding(“type”, “type”))
), // end Auto Panel body

// the Panel holding the left port elements, which are themselves Panels,

$(go.Panel, “Vertical”,
{ row:1, column:2,
itemTemplate:
$(go.Panel,“Vertical”,
{
alignment: go.Spot.Left
},
$(“Button”, // button A
{
click: buttonExpandCollapse, fromLinkable: true, toLinkable: true, toSpot: go.Spot.Right,cursor: “pointer”
},
new go.Binding(“name”, “name”),
new go.Binding(“portId”, “portId”),
makePort(“R”, go.Spot.Right, true, true),
$(go.TextBlock,
new go.Binding(“text”, “text”)),
$(go.TextBlock,
{
visible:false
},
new go.Binding(“nodekey”, “nodekey”),
new go.Binding(“operatorValue”, “operatorValue”),
new go.Binding(“nodekey2”, “nodekey2”))


) // end button A

) // end itemTemplate
},
new go.Binding(“itemArray”, “nodeArray”),
new go.Binding(“sourceBT”, “sourceBT”),
new go.Binding(“targetArray”, “targetArray”)
) ,
// ,end Horizontal Panel
$(go.TextBlock,
{ name:“terminalTextBlock”,row:1, column:3,visible:false,width: 100, wrap: go.TextBlock.WrapDesiredSize,isMultiline:true, },
new go.Binding(“text”, “terminalText”)),
makePort(“L”, go.Spot.Left, true, true)// end Auto Panel body

)); // end

The item array is being shared, so you need to set the Mode.copyNodeDataFunction to copy the array when copying the data object. Some of the samples demonstrate this.