DataTables Usage with AJAX (Create and Update Table)
This post guides you through the complete implementation of DataTable, from initializing the DataTable to updating the data in the table. It includes instructions on how to connect your API to get the data for the table.
You can find the DataTable Docs here. But I was unable to get the exact things which I was trying to do. Plus I found the reference docs of DataTable a bit confusing.
So, here is a simple process to use DataTables using your own API to create a Table with AJAX.
Initialization of DataTable:

HTML for the Table:

Note:: class and style used are as per my requirements. You can add your own classes and styles as per your requirement.
Updating the Table and Reinitialize the DataTable
If you have filters that can be used to filter out the data shown in the table, you can add this script to your code.

If you want to try out the code, here is the JSFiddle of the code.
Feel free to provide your feedback or any corrections if required.
