score:2

You need to keep the parent in variable and iterate over them to prepare nested data as

   var divs = d3.select("body").selectAll("div")
    .data(dataArr)
    .enter()
    .append("div")
    .attr("class", "outerDiv");


   var innerdiv = divs.selectAll("div")
   .data(function(d){console.log(d); return d.stats}) //passing nested data
   .enter()
   .append("div")
   .attr("class","innerdiv")

Sample fiddle is here http://jsfiddle.net/Qh9X5/9666/


Related Query

More Query from same tag