I was trying to replicate a table similar to the one shown in this image:
(disregard the styling). I am struggling with how to properly format the data to create a similar table in HTML.
$scope.toddlers = [
{
"name": "a",
"day": 1,
"total": 3
},
{
"name": "b",
"day": 2,
"total": 4
},
{
"name": "c",
"day": 4,
"total": 1
}
];
I believe there might be something wrong with my data format as I can't seem to get the table right. How should I adjust my data formatting to achieve the desired result?
Just so you are aware, I am retrieving my data through MongoDB's aggregate function.