JSFiddle - React, Tailwind, and code Playground
by Damith Nuwan Sampath
HTML
<table id="records_table" border='1'>
<tr>
<th>Rank</th>
<th>Content</th>
<th>UID</th>
</tr>
</table>
JavaScript
var response = '[{"rank":"9", "content":"Alon", "UID":"5" }';
response += ',{"rank":"6","content":"Tala","UID":"6"}';
response += ',{"rank":"6","content":"Tala","UID":"6"}';
response += ',{"rank":"6","content":"Tala","UID":"6"}]';
response = $.parseJSON(response);
$(function () {
$.each(response, function (i, item) {
$('<tr>').append(
$('<td>').text(item.rank),
$('<td>').text(item.content),
$('<td>').text(item.UID)).appendTo('#records_table');
// $('#records_table').append($tr);
//console.log($tr.wrap('<p>').html());
});
});