title: Populate html table on jQuery success event
body: <p>Here's my problem.</p>
  
  <p>I have this html table:</p>
  
  <pre><code>&lt;table class="flexme" id="table" border="1"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th width="100"&gt;Usuario&lt;/th&gt;
        &lt;th width="100"&gt;Nombre&lt;/th&gt;
        &lt;th width="100"&gt;Apellido&lt;/th&gt;
        &lt;th width="100"&gt;Cedula/Rif&lt;/th&gt;
        &lt;th width="140"&gt;Direccion&lt;/th&gt;
        &lt;th width="100"&gt;E-mail&lt;/th&gt;
        &lt;th width="100"&gt;Telefono1&lt;/th&gt;
        &lt;th width="100"&gt;Telefono2&lt;/th&gt;
        &lt;th width="100"&gt;Status&lt;/th&gt;
        &lt;th width="150"&gt;Acci&amp;oacute;n&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr id="test"&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
     &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>and I have this ajax request:</p>
  
  <pre><code>$.ajax({ 
     type    : "POST",
     url     : "service.php",
     dataType: "json",
     data: {
         action:"search",
         type: 'users',
         parameter: parameter,
         parameterContent: parameterContent,
     },           
     success:function(data) {
         $('#searchResults').show();
         var len = data.length;
         for (var i = 0; i&lt; len; i++) {
         var username  = data[i].username;
         var name  = data[i].uname;
         var lastname  = data[i].lastname;
  
     }
  })
  </code></pre>
  
  <p>What is the correct way to populate the html table with the info that comes via JSON? I have been trying with no success. I have done tests with <code>append()</code> <code>html()</code> but no success at all, can someone please point me into the right direction?</p>
  
  <p>What I want is to take the info that comes via JSON and populate the table dynamically with this info. </p>