title: Array undefined in D3.js
body: <p>I have a Rails model which can have children, an example in JSON looks like this:</p>
  
  <pre><code>{"content":"123",
   "created_at":"2013-08-23T22:17:03Z",
   "folder_id":4,
   "id":135,
   "parent_id":null,
   "title":"Will this succeed? 1234",
   "updated_at":"2013-08-23T22:17:03Z",
   "user_id":2,
   "children":
     [{"content":"123","created_at":"2013-09-05T03:52:05Z","folder_id":4,"id":189,"parent_id":135,"title":"123","updated_at":"2013-09-05T03:52:05Z","user_id":2}]
  }
  </code></pre>
  
  <p>My problem is that each of these JSON objects is turned into a D3 node, and I need to be able to take actions based on whether or not the <code>children</code> array is empty. However, I performed a console.log on <code>submissions.children</code> and it comes back <code>undefined</code>. Why is that?</p>
  
  <p><strong>Update</strong>
  Here's the show action in my submissions controller:</p>
  
  <pre><code>def show 
      respond_to do |format|
          format.js
          format.json {render json: @submission.as_json(include:[:children])}
          format.html 
      end
  end 
  </code></pre>