title: javascript convert object to an array
body: <p>I am trying to build a d3.js heatmap from a CSV dataset. Upon import using d3.csv, the data looks like this:</p>
  
  <pre><code>[Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, columns: Array(11)]
  </code></pre>
  
  <p>where each object is as follows:</p>
  
  <pre><code>Object {0: "0.934999642", 1: "0.1031451091", 2: "0.077435557", 3: 
  "0.129644215", 4: "0.666245944", 5: "0.133087829", 6: "0.113218775", 7: 
  "0.120796943", 8: "0.257501418", 9: "0.840916491", "": "0"}
  </code></pre>
  
  <p>I have been trying to use the data as is, but for loops are too slow (the real dataset has 1300 values), and attempting a nesting structure doesn't work because d3's data() function can only take an array. </p>
  
  <p>Like so:</p>
  
  <pre><code>var row =  svg.selectAll(".rows")
                       .data(data)
                       .enter()
                       .append("rect")
                       [etc]
  
  d3.selectAll(".blocks")//nested data
                       .data(function(d) {//d has no length property, so this line fails
                          return d;
                       })
                       .enter()
                       .append("rect")
                      [etc] 
  </code></pre>
  
  <p>How can I convert the array of objects into an array of arrays? Alternatively, is there a way to use the array of objects successfully? Also, is there any reason why it isn't coming directly from the CSV in an array of arrays rather than this weird object array? The data was curated in and exported from Python's Pandas, if that makes a difference, and we can make adjustments there.</p>
  
  <p>Thank you.</p>