How to append data to bootstrap data table?

How to append data to bootstrap data table?

I am getting the data to display but the table says "No data available in table" then it displays the database data and it does not allow me to do any of the built in features that come with the bootstrap data table like sort columns of pagination. Here is my code:

  1. <div class="table-responsive">
  2. <table id="datable_1" class="table table-hover display pb-30" >
  3. <thead>
  4. <tr>
  5. <th>Product</th>
  6. <th>Variation</th>
  7. <th>Department</th>
  8. <th>Category</th>
  9. <th>Air/Boat</th>
  10. </tr> 
  11. </thead>
  12. <tbody>
  13. </tbody>
  14. <script type='text/javascript'>
  15. $(document).ready(function () {
  16. /* call the php that has the php array which is json_encoded */
  17. $.getJSON('dist/php/catalog.php', function (catalog) {
  18. /* data will hold the php array as a javascript object */
  19. $.each(catalog, function (catalog_key, catalog_val) {
  20. $("table.table").append("<tr><td>" + catalog_val.item_name + "</td><td>" + catalog_val.variation + "</td><td>" + catalog_val.department + "</td><td>" + catalog_val.category + "</td><td>" + catalog_val.vessel_name + "</td></tr>");
  21. });
  22. });
  23. });
  24. </script>
  25. </div>