title: Appending td to rows with $.each loop JQuery
body: <p>I am trying to add data to table cells via an each loop in JQuery. My code for the loop is below.</p>
  
  <pre><code> $.getJSON(filter, function (data) {
          $.each(data, function (key, val) {
             var entry = $('&lt;tr&gt;').append(
              $.each(val, function (key, val) {      
                  $('&lt;td contenteditable="true"&gt;').text(val);
              }));
  
              // var entry = $('&lt;tr&gt;').append(
              //     $('&lt;td contenteditable="true"&gt;').text(val.firstName),
              //     $('&lt;td contenteditable="true"&gt;').text(val.lastName),
              //     $('&lt;td contenteditable="true"&gt;').text(val.address),
              //     $('&lt;td contenteditable="true"&gt;').text(val.city),
              //     $('&lt;td contenteditable="true"&gt;').text(val.state),
              //     $('&lt;td contenteditable="true"&gt;').text(val.zipcode)
              // );
              entry.appendTo(table);
  </code></pre>
  
  <p>The loop code is not populating the table with the rows. If I run the commented section below the $.each loop instead it populates fine. I can log the value of val in the loop and the data is coming in fine. I can even log to the td
  Any ideas on why this is not working will be greatly appreciated.</p>