add row in data table code example
Example: datatables add row
const table = $("#yourTable").DataTable();
table.row.add( /* array or object */).draw();
// or using tr
const tr = $("<tr><td>1</td><td>2</td></tr>");
table.row.add(tr[0]).draw();
// you must call draw() to see your changes