How to find link for key

i m using find part for key function it returns a node if “key” is also used for both nodes and link how to get just the link with a certain key?

I suppose we should implement a Diagram.findLinkForKey method…

But you can call https://gojs.net/latest/api/symbols/GraphLinksModel.html#findLinkDataForKey followed by https://gojs.net/latest/api/symbols/Diagram.html#findLinkForData.

This is implemented in v2.1.