title: D3 nodes and links from JSON with nested arrays of children
body: <p>I've got a JSON file that looks like this:</p>
  
  <pre><code>{
      Object: {
          children: Array[4]
          ...
      Object: {
          children: Array[1]
              Object: {
                   children: Array[3]
                   ...
              },
              Object: {
                   children: Array[1]
                   ...
              },
          ...
      }
      ...
  }
  </code></pre>
  
  <p>The array is a bunch of objects that have arrays of children that contain arrays of children going a few levels deep.</p>
  
  <p>My problem is when I try to turn this into a set of nodes and links for use in a d3 force layout, I can't get it to display properly. I've tried using array.map or forEach to recursively go through all the objects and create the links myself, but this seems overly tedious.</p>
  
  <p>Is there a simpler way to get this data prepared to be displayed in a force layout? What am I missing?</p>