How to get the node LInkDrawn to

Hi,

Is there a method to get the NodeDetails of the Node LinkDrawn to? After drawing a link from one node to another I want to get the Details of the Node LinkDrawn to and then I want to traverse in the diagram to find a particular node. For that, I always have to check the parent node while traversing upwards.

https://gojs.net/latest/intro/events.html#LinkDrawn

$(go.Diagram, . . .,
  {
    . . .,
    "LinkDrawn": function(e) {
      var link = e.subject;
      var to = link.toNode;
      . . . Look at the properties of to.data . . .
    }
  })

Thank You!!

I do get the Node connected to the link. I want to get the Parent of CurrentNode by Node findTreeParentNode property. I want to do this way because I will put this into a recursive function which will keep on checking parent of the node until it satisfies the condition.

That is a common operation. There are examples of this in the samples. Search for uses of that method: Search · findtreeparentnode · GitHub