Accessing selected node data

Hi,

I’m trying to access a spesific node data. Is there a GoJS function to achieve this? I’m just need to put clicked node’s data to a global variable.

Best,
Verde

Once you have a Node (or Link), you can get its node.data and look at all of its properties.

Remember that if you want to modify that model data, you have to use Model.set or other Model methods. And you have to make all changes within a single transactiobn.
https://gojs.net/latest/learn/graphObject.html
https://gojs.net/latest/intro/usingModels.html
https://gojs.net/latest/intro/dataBinding.html

A post was merged into an existing topic: model.toJson saving issue