I am working on this demo. How can I add JavaScript sourced data into an existing table?
I have seen this example on Datatables website but this looks like only one time process and in my case I need to truncate and load the dataset[] after each query add eventually add the result in the table as a new row.
$(document).ready(function () {
var dataSet = ["Tiger", "Wood ", "Architect", "F15", "36", "Feb, 15"];
$('#example').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'excel', 'pdf', 'csv']
});
$("#addData").on("click", function(){
});
});