title: How can I perform this d3.js magic (Grouped Bar Chart) with JSON rather than CSV?
body: <p>I am attempting to follow this example: <a href="http://bl.ocks.org/3887051" rel="nofollow noreferrer">http://bl.ocks.org/3887051</a></p>
  
  <p>However, instead of a CSV, I have a JSON object.</p>
  
  <p>Now, I saw that I could convert my JSON into a CSV by following the instructions here: <a href="https://stackoverflow.com/questions/8847766/how-to-convert-json-to-csv-format-and-store-in-a-variable">How to convert JSON to CSV format and store in a variable</a></p>
  
  <p>That feels like a hack though.</p>
  
  <p>Here's my JSON:</p>
  
  <pre><code>[{"YEAR":2012,"MONTH":1,"MMM":"JAN","Total_Flights":30,"Completed":21,"Canceled":7,"Aborted":2},
  {"YEAR":2012,"MONTH":2,"MMM":"FEB","Total_Flights":54,"Completed":28,"Canceled":20,"Aborted":6},
  {"YEAR":2012,"MONTH":3,"MMM":"MAR","Total_Flights":39,"Completed":25,"Canceled":12,"Aborted":2},
  {"YEAR":2012,"MONTH":4,"MMM":"APR","Total_Flights":27,"Completed":21,"Canceled":6,"Aborted":0},
  {"YEAR":2012,"MONTH":5,"MMM":"MAY","Total_Flights":35,"Completed":21,"Canceled":12,"Aborted":2},
  {"YEAR":2012,"MONTH":6,"MMM":"JUN","Total_Flights":15,"Completed":10,"Canceled":4,"Aborted":1},
  {"YEAR":2012,"MONTH":7,"MMM":"JUL","Total_Flights":42,"Completed":18,"Canceled":21,"Aborted":3},
  {"YEAR":2012,"MONTH":8,"MMM":"AUG","Total_Flights":43,"Completed":29,"Canceled":8,"Aborted":6},
  {"YEAR":2012,"MONTH":9,"MMM":"SEP","Total_Flights":28,"Completed":20,"Canceled":8,"Aborted":0},
  {"YEAR":2012,"MONTH":10,"MMM":"OCT","Total_Flights":43,"Completed":24,"Canceled":18,"Aborted":1},
  {"YEAR":2012,"MONTH":11,"MMM":"NOV","Total_Flights":35,"Completed":18,"Canceled":17,"Aborted":0},
  {"YEAR":2012,"MONTH":12,"MMM":"DEC","Total_Flights":45,"Completed":9,"Canceled":32,"Aborted":4},
  {"YEAR":2013,"MONTH":1,"MMM":"JAN","Total_Flights":49,"Completed":4,"Canceled":43,"Aborted":2}]
  </code></pre>
  
  <p>My game plan is to have the chart display four bars for each month: Total, Completed, Canceled and Aborted.</p>
  
  <p>How would I transform this example code to deal with my JSON? </p>
  
  <p>I'll be swimming through the d3.js tutorials here: <a href="https://github.com/mbostock/d3/wiki/Tutorials" rel="nofollow noreferrer">https://github.com/mbostock/d3/wiki/Tutorials</a> until I figure it out or someone wise shows me the ropes.</p>
  
  <p>I'll periodically update this post with my progress.</p>
  
  <p>UPDATE #1: Anyone coming here should check out these godsend tutorials: <a href="http://alignedleft.com/tutorials/d3/" rel="nofollow noreferrer">http://alignedleft.com/tutorials/d3/</a> </p>
  
  <p>I'm still working on it. Such a powerful library. I'll report back again within a few hours.</p>