Get key from after ungrouped a node

After ungrouping a node how to get key of that node?

Here is what the ungroup command does:

In general there might be any number of nodes and links that are selected after the ungrouping.

To get the key for a Node or simple Part:, or more generally:


Actually I need to get the key of ungroupped node. I have tried to get that ungrouped node data from SelectionDeleted/ SelectionUngrouped/ Commandandler.UngroupSelection but I am not able to get ungroupped node data’s.

I suppose you could override CommandHandler.ungroupSelection to record the of either the argument Group or of all of the selected ungroupable Groups before calling the base method.

Thanks, I got it.
class CustomCommandHandler extends go.CommandHandler{

public ungroupSelection(group:any){