What is the return type of Link.toNode?

i want to display only the name of the node but i cant use the link.toNode with a substring function ? What is the return type of the link.toNode ?

It returns a Node. Maybe you want to access the node.data and take some property from there.

the link.data.from return the key but i want to display the refered name to that key
and when I reach link.fromNode it returns something like this Node#1582(name) however i cant substring that returs

What does your node data look like?

I think you want something like link.fromNode.data.key.

thanks @jhardy it works , i was looking for …data.name