title: Formatting JSON Data with ColdFusion for HighCharts
body: <p>So I'm working on a pie chart using HighSlide and ColdFusion.</p>
  
  <p>To make this simple, for the data it expects a string like this:<br></p>
  
  <pre><code>data: [{name: 'Jane',y: 13}, {name: 'John',y: 23}, {name: 'Joe',y: 19}]
  </code></pre>
  
  <p><br>
  What i've done to accomplish this is to loop through my query results and create a string like this:<br></p>
  
  <pre><code>&lt;cfloop query="getAreaCounts"&gt;
       &lt;cfset areaList = listAppend(areaList, "{name: '#name#',y: #y#}")&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p><br>
  I know there has to be an easier/smarter way right?  Since this is JSON data, i figured I could just do this:</p>
  
  <pre><code>&lt;cfoutput&gt;#SerializeJSON(getAreaCounts)#&lt;/cfoutput&gt;
  </code></pre>
  
  <p><br>
  But that returns a JSON string like this which highcharts won't process:</p>
  
  <pre><code>{"COLUMNS":["Y","NAME"],"DATA":[[8,"Area1"],[7,"Area2"],[1,"Area3"],[1,"Area4"]]}
  </code></pre>
  
  <p>Any help pointing me in the right direction would be great.  Do I need to dig deeper into a JSON - howto?</p>