async function formation() { let result = await fetch("https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&q=&sort=tri&facet=fili&timezone=Europe%2FBerlin"); let resultats = await result.json(); console.log(result); console.log(resultats); let table = resultats["facet_groups"][0]["facets"]; console.log(table); const tableBody = document.querySelector("tbody1"); for (tes of table) { const tableRow = document.createElement("tr"); const formationCell = document.createElement("td"); let texteformation = document.createTextNode(tes.name); formationCell.appendChild(texteformation); tableRow.appendChild(formationCell); const nombredeplaceCell = document.createElement("td"); const nombredeplace = document.createTextNode(tes.count); nombredeplaceCell.appendChild(nombredeplace); tableRow.appendChild(nombredeplaceCell); tableBody.appendChild(tableRow); } } var testformation = { css: null, exports: { onMounted() { formation(); } }, template: (template, expressionTypes, bindingTypes, getComponent) => template('