document.addEventListener("DOMContentLoaded", function () { fetch('/information.json') .then(response => response.json()) .then(data => { const tableBody = document.getElementById('infoTable').querySelector('tbody'); // Create table rows for (const [key, value] of Object.entries(data)) { const row = document.createElement('tr'); const cellKey = document.createElement('td'); const cellValue = document.createElement('td'); cellKey.textContent = key; cellValue.textContent = value; row.appendChild(cellKey); row.appendChild(cellValue); tableBody.appendChild(row); } }) .catch(error => console.error('Error fetching the data:', error)); });