title: How to make datatables to handle Ajax requests?
body: <p>I want datatables to handle itself the Ajax call to populate it, so I have this config:</p>
  
  <pre><code>$('#tabela-usuario-portal').dataTable({
  "responsive": true,
  "ordering": false,
  "retrieve": true,
  "ajax": 'usuario/pesquisaUsuario',
  "lengthMenu": [5, 10, 20],
  "columns": [
      { "data": "usuario" },
      { "data": "email" },
      { "data": "cpf" }
  ],
  "language": {
      "lengthMenu": "Exibindo _MENU_ por p&amp;aacute;gina",
      "zeroRecords": 'Nada',
      "paginate": {
          "previous": "Anterior",
          "next": "Próximo"
      }
  },
  "dom": 't&lt;"tfooter"pl&gt;'
  });
  </code></pre>
  
  <p>and this HTML:</p>
  
  <pre><code>&lt;table id='tabela-usuario-portal' class="tabelaGrid table-hover"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;usuario&lt;/th&gt;
              &lt;th&gt;email&lt;/th&gt;
              &lt;th&gt;cpf&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Datables succesfully makes the ajax request, and the following is returned:</p>
  
  <pre><code>[{"id":22,"id_sgp":24539,"cpf":"58287467748","email":"ffa@aa.com","usuario":"terminator","cod_perfil"
  :1,"situacao":"A"},{"id":30,"id_sgp":33951,"cpf":"24423229196","email":"zeze@indra.es","usuario":"tetris"
  ,"cod_perfil":89,"situacao":"A"},{"id":28,"id_sgp":34001,"cpf":"31155957865","email":"af@j.com","usuario"
  :"zczc","cod_perfil":89,"situacao":"A"}]
  </code></pre>
  
  <p>But I'm getting an error: </p>
  
  <blockquote>
    <p>TypeError: f is undefined</p>
  </blockquote>
  
  <p>I think I'm almost there, I just have to make the correct reference between data from JSON and his respective place. I already read the docs but couldn't figure it out. Any help would be much appreciated.</p>