So I create the nodes like this...
var nodes = new vis.DataSet([
{id: 1, label: 'Peter'},
{id: 2, label: 'John'},
{id: 3, label: 'Sally'},
]);
then later on in an event handler after clicking on a node I get the id of the node i clicked. How do I get node object from its id?
I actually found the documentation here; http://visjs.org/docs/data/dataset.html
node = nodes.get(nodeId);