Can I create nodes dynamically

suppose I have a Input array of some devices with different no. of ports i.e
var inputArray = [
{ category: “Device1”,key:“Device1”,
Name:“Device1”,
Type:“Type1”,
Iport:“IP1”,
Oport:“OP1”,
color: “#18499e
},
{ category: “Device2”,key:“Device2”,
Name:“Device2”,
Type:“Type2”,
Iport:“IP1”,
Iport1:“IP2”,
Oport:“OP2”,
color: “#18499e
},
{ category: “Device3”,key:“Device3”,
Name:“Device3”,
Type:“Type3”,
Iport:“IP1”,
Iport1:“IP2”,
Oport:“OP1”,
Oport1:“OP2”,
color: “#18499e
},
{ category: “variable1”,key:“variable1”,
Name:“variable1”,
Type:“Variable”,
color: “#18499e
}
];

how can i use this this to create nodes dynamically. all help will be appreciated thanks.

Sure, just assign that Array to the GraphLinksModel.nodeDataArray of a new GraphLinksModel that you assign to Diagram.model. Then add node templates for each category of node to the Diagram.nodeTemplateMap.

Please read:

And all of the pages of the Introduction that apply to your app, starting at: