title: could not get data from file by ajax with jquery datatable
body: <p>I use the sample here:<a href="https://datatables.net/examples/styling/jqueryUI.html" rel="nofollow noreferrer">https://datatables.net/examples/styling/jqueryUI.html</a></p>
  
  <p>Below is my html and jquery code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
    &lt;link rel="stylesheet" type="text/css" href="jquery-dataTables.css"&gt;
    
    &lt;script type="text/javascript" charset="utf8" src="jquery-min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" charset="utf8" src="jquery-dataTables.js"&gt;&lt;/script&gt;
    &lt;script&gt;
    
    $(document).ready(function() {
      $('#example').dataTable( {
          "ajax": "data/test.txt",
          "columns": [
              { "data": "name" },
              { "data": "position" },
              { "data": "office" },
              { "data": "extn" },
              { "data": "start_date" },
              { "data": "salary" }
          ]
      } );
  } );
    &lt;/script&gt;
    
  &lt;/head&gt;
  &lt;body&gt;
  &lt;table id="example" class="display" cellspacing="0" width="100%"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Position&lt;/th&gt;
                  &lt;th&gt;Office&lt;/th&gt;
                  &lt;th&gt;Extn.&lt;/th&gt;
                  &lt;th&gt;Start date&lt;/th&gt;
                  &lt;th&gt;Salary&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
   
          &lt;tfoot&gt;
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Position&lt;/th&gt;
                  &lt;th&gt;Office&lt;/th&gt;
                  &lt;th&gt;Extn.&lt;/th&gt;
                  &lt;th&gt;Start date&lt;/th&gt;
                  &lt;th&gt;Salary&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/tfoot&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is the structure of my file</p>
  
  <p><img src="https://i.stack.imgur.com/nxFa0.png" alt="enter image description here"></p>
  
  <p>But it couldn't load data into datatable, anyone can help?</p>
  
  <p>Edit (Attach my test data): this data is used for </p>
  
  <p>"data": [
      {
        "name": "Tiger Nixon",
        "position": "System Architect",
        "salary": "$320,800",
        "start_date": "2011/04/25",
        "office": "Edinburgh",
        "extn": "5421"
      },
      {
        "name": "Garrett Winters",
        "position": "Accountant",
        "salary": "$170,750",
        "start_date": "2011/07/25",
        "office": "Tokyo",
        "extn": "8422"
      },
      {
        "name": "Ashton Cox",
        "position": "Junior Technical Author",
        "salary": "$86,000",
        "start_date": "2009/01/12",
        "office": "San Francisco",
        "extn": "1562"
      },
      {
        "name": "Cedric Kelly",
        "position": "Senior Javascript Developer",
        "salary": "$433,060",
        "start_date": "2012/03/29",
        "office": "Edinburgh",
        "extn": "6224"
      },<br>
      {
        "name": "Cara Stevens",
        "position": "Sales Assistant",
        "salary": "$145,600",
        "start_date": "2011/12/06",
        "office": "New York",
        "extn": "3990"
      },<br>
      {
        "name": "Donna Snider",
        "position": "Customer Support",
        "salary": "$112,000",
        "start_date": "2011/01/25",
        "office": "New York",
        "extn": "4226"
      }
    ]</p>
  
  <p>Thanks</p>