title: Dynamic Column Names in JQuery DataTables
body: <p>Im not able to declare the table headers dynamically in the datatables. Here's what i've tried so far: </p>
  
  <pre><code>if (result != "[]") {
  
          var resultColumns = [];
  
          $.each(result.Columns, function(i, value){
  
              var obj = { sTitle: value };
  
              resultColumns.push(obj);
          });
  
  
          $('#trendingTable').dataTable({
              "aaData": result,
              //important  -- headers of the json
              "aoColumns": [ resultColumns ],
              "sPaginationType": "full_numbers",
              "aaSorting": [[0, "asc"]],
              "bJQueryUI": true,
              "bDestroy": true,
  
          });
      }
  </code></pre>
  
  <p>My JSON result:</p>
  
  <pre><code>{"Column1":["ABC","XYZ"],"Column2":[0.0,0.0],"Colum3":[0.0,0.0],,"Columns":["Column1","Column2","Colum3"]}
  </code></pre>