How to extract meaningful data from e.diagram.selection

I m trying to get the category of node i m about to drop from its properties but i cant seem to find how to do it.


consider this diagram i want to check that before doping selection from pallet (on left side) if it is a primary key or attribute or schema.

You could look at the Palette’s selection to get information about what is being dragged.

I meant to ask that like “e.subject.fromnode.memberpart.value.data” gives me the desired data/json so what do i need to use to get the data out of e.diagram.selection

Diagram.selection is a GoJS collection. In this case it is a Set | GoJS API. You can read about iterating over collections at GoJS Collections -- Northwoods Software.