I am making a Treasure Hunt app which has a scoreboard. In the scoreboard route I am asynchronously calling a function which return JSON data from MongoDB. This is what the function returns:
[
{
"_id": "rational",
"total": 0
},
{
"_id": "creative",
"total": 0
},
{
"_id": "confident",
"total": 60
},
{
"_id": "passionate",
"total": 30
},
{
"_id": "ingenious",
"total": 30
}
]
The _id is the team name and total is the number of points the team scored. I am using Handlebars as my templating engine and am still new to it. I want to make a HTML table that shows the team names with respective total scores but can't seem to figure it out. Please help me solve this problem.