ABLE HEADER.
             th.innerHTML = col[i];
             tr.appendChild(th);
         }

         // ADD JSON DATA TO THE TABLE AS ROWS.
         for (var i = 0; i < getDataKunjungan.length; i++) {

             tr = table.insertRow(-1);

             for (var j = 0; j < col.length; j++) {
                 var tabCell = tr.insertCell(-1);
                 tabCell.innerHTML = getDataKunjungan[i][col[j]];
             }
         }

         // FINALLY ADD THE NEWLY CREATED TABLE WITH JSON DATA TO A CONTA