function getAllData(){ $.ajax({ url: "/getall", type: "get", contentType: 'application/json', dataType: 'json', success: function(response){ console.log(response) let data = response; $('#datatable tbody').empty(); $.each(response, function(index, item) { $('#datatable tbody').append( '