title: aoColumnDefs data in jQuery DataTables
body: <p>I am using Jquery DataTables to populate some data on my page, I have come to a point where everything works fine except i am unable to hide sorting arrow for one of the column.</p>
  
  <p>I need to use <code>aoColumnDefs</code> parameter to accompolish any column level task.</p>
  
  <p>When i hardcode <code>"aoColumnDefs": [{ "bSortable": false, "aTargets": [2]}]</code>, sorting arrow gets hidden/disabled from column[2], As i am using HTML5 and passing every parameter from HTML to make my whole DataTable generic, I need to pass this <code>aoColumnDefs</code> through variables.</p>
  
  <p>I have tried this</p>
  
  <p><code>var mSortingString = [];<br>
              var disableSortingColumn = "2";
              mSortingString.push({ "bSortable": false, "aTargets": [disableSortingColumn] });</code></p>
  
  <p>and then assigning this <code>mSortingString</code> string as value to <code>aoColumnDefs</code> but that doesnt seems to work. I can see <code>mSortingString</code> having above data but that doesn't disable sorting arrows. Another thing is as I have given variable <code>disableSortingColumn</code> value of 2, but in <code>mSortingString</code> array, its 1.</p>
  
  <p>Can anyone help me in right direction, I think its my minimal knowledge of Javascript.</p>
  
  <p>Have tried looking at this <a href="https://stackoverflow.com/questions/12311420/create-javascript-array-json-format-for-datatables-aocolumndefs">Create JavaScript array (JSON format) for DataTables aoColumnDefs</a> but this doesnt work for me.</p>