title: d3 - reading JSON data instead of CSV file
body: <p>I'm trying to read data into my calendar visualisation using JSON. At
  the moment it works great using a CSV file:</p>
  
  <pre><code>d3.csv("RSAtest.csv", function(csv) {
    var data = d3.nest()
      .key(function(d) { return d.date; })
      .rollup(function(d) { return d[0].total; })
      .map(csv);
  
   rect.filter(function(d) { return d in data; })
        .attr("class", function(d) { return "day q" + color(data[d]) +
  "-9"; })
        .select("title")
        .text(function(d) { return d + ": " + data[d]; });
  
  });
  </code></pre>
  
  <p>It reads the following CSV data:</p>
  
  <pre><code>date,total
  2000-01-01,11
  2000-01-02,13
  .
  .
  .etc
  </code></pre>
  
  <p>Any pointers on how I can read the following JSON data instead:
  <code>{"2000-01-01":19,"2000-01-02":11......etc}</code></p>
  
  <p>I tried the following but it not working for me (datareadCal.php spits
  out the JSON for me):</p>
  
  <pre><code>d3.json("datareadCal.php", function(json) {
    var data = d3.nest()
      .key(function(d) { return d.Key; })
      .rollup(function(d) { return d[0].Value; })
      .map(json); 
  </code></pre>
  
  <p>thanks</p>