How to select multiple nodes

How to select multiple nodes using ?

My Code is:-[i].data.key));

I want multiple nodes selected by code. only selects a single Part. You want to call Diagram | GoJS API instead.

I am using the following code

var diagram_data = myDiagram.selection.toArray();
var node_arr = [];
for (i = 0; i < diagram_data.length; i++) {

It is not selecting.
What wrong in my code?

Your code appears equivalent to:


which does nothing.