I didn't figure out how to populate an array and display it as soon as i target the route, i'm starting with nodeJs.
At the moment i'm able to console Log a list of object, i want to populate an array and display it when i do localhost:3000/
sortGroup=(group)=> {
for (const entry of group.entries) {
console.log(`Entry: ${field(entry, 'Name')}: UserName: ${field(entry, 'Surname')} || Age: ${field(entry, 'Age')} || Age: ${field(entry,'Address')}`)
}
for (const subGroup of group.groups) {
sortGroup(subGroup)
}
}
app.get('/',async (req, res) => {
res.send(`<h1> I want to display the table</h1>`)
})