data[0] -> data
This commit is contained in:
parent
d932f53567
commit
6a5b2ac8e8
|
@ -183,8 +183,7 @@
|
|||
|
||||
function createTableHTML(data) {
|
||||
let tableHTML = '<table border="1"><tr>';
|
||||
alert(tableHTML);
|
||||
Object.keys(data[0]).forEach(key => {
|
||||
Object.keys(data).forEach(key => {
|
||||
tableHTML += `<th>${key}</th>`;
|
||||
});
|
||||
alert(tableHTML);
|
||||
|
|
Loading…
Reference in New Issue