I am using Datatables and have a button on the page that refreshes the table using AJAX. To be clear the table isn\'t using an ajax source of data, we are just using ajax to ref
check fnAddData: https://legacy.datatables.net/ref
$(document).ready(function () {
var table = $('#example').dataTable();
var url = '/RESTApplicationTest/webresources/entity.person';
$.get(url, function (data) {
for (var i = 0; i < data.length; i++) {
table.fnAddData([data[i].idPerson, data[i].firstname, data[i].lastname, data[i].email, data[i].phone])
}
});
});