title: Accessing a Nodes Label parameter value in Vis.js
body: <p>I am trying to access a nodes label parameter value in a vis.js dataset. I know I can get the <code>nodeId</code> from <code>var nodeId = params.nodes[0];</code></p>
  
  <p>How can I access the value of the Label parameter for Node id=2?</p>
  
  <pre><code>// create an array with nodes
  var nodes = [
      {id: 1, label: 'Node 1'},
      {id: 2, label: 'Node 2'},
      {id: 3, label: 'Node 3'},
      {id: 4, label: 'Node 4'},
      {id: 5, label: 'Node 5'}
  ];
  
  // create an array with edges
  var edges = new vis.DataSet([
      {from: 1, to: 3},
      {from: 1, to: 2},
      {from: 2, to: 4},
      {from: 2, to: 5}
  ]);
  
  // create a network
  var container = document.getElementById('mynetwork');
  var data = {
      nodes: nodes,
      edges: edges
  };
  
  
  network.on("click", function (params) {
  
      if (params.nodes.length &gt; 0) {
  
          var nodeId = params.nodes[0];
  </code></pre>