$(document).ready(function(){
    $.ajax({
        url: 'getData.php',
        type: 'get',
        dataType: 'JSON',
        success: function(response){
            var len = response.length;
            for(var i=0; i<len; i++){
                var id = response[i].id;
                var username = response[i].username;
                var name = response[i].name;
                var email = response[i].email;

                var tr_str = "<tr>" +
                    "<td align='center'>" + (i+1) + "</td>" +
                    "<td align='center'>" + timestamp + "</td>" +
                    "<td align='center'>" + url + "</td>" +
                    "<td align='center'>" + searchtext + "</td>" +
                    "</tr>";

                $("#recordsTable").append(tr_str);
            }

        }
    });
});