title: How to find links in d3 v4?
body: <p>I have used the following code in d3 v3 to find nodes and links for a horizontal tree (top to bottom). <a href="https://www.codeproject.com/Tips/1021936/Creating-Vertical-Collapsible-Tree-With-d-js" rel="noreferrer">Here</a> is how the tree will look like:</p>
  
  <p><code>var nodes = d3.layout.tree().nodes(jsonData).reverse();
  var links = d3.layout.tree().links(nodes);</code></p>
  
  <p>I'm trying to do the same in d3 v4. The v4 is missing the tree.links(nodes) method where it can accept the nodes.</p>
  
  <p>How can I find the links in d3 v4?</p>