I'm following the example on this page to setup an Ajax source for JQuery Datatables. http://datatables.net/release-datatables/examples/ajax/objects.html
I can recreate this just fine if I start out with the source file just like their example array, in the following format.
{
"aaData": [
{
"engine": "Trident",
"browser": "Internet Explorer 4.0",
"platform": "Win 95+",
"version": "4",
"grade": "X"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.0",
"platform": "Win 95+",
"version": "5",
"grade": "C"
}
]
}
However, I'm using ColdFusion and I want my source data to come from a query. So, I followed another example about populating an array from a cfquery. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec09f0b-7fea.html
That will put my sample data array in the following format.
RecordID: 2, Name: Al
RecordID: 1, Name: Mike
RecordID: 3, Name: Bill
What can I do to run a cfquery that will populate my source file in the proper format needed for the sAjaxSource attribute?