I am using $group by $week. It's returning the #week in the year, but I want the start date, end date of each week instead of
Sample:
Current result:
[{
"_id" : 20,
"averageValue" : null
},
{
"_id" : 21,
"averageValue" : 28.1875
}]
Expect:
[{
"_id" : [{ start: "2021-01-01", "end": "2021-01-07" }],
"averageValue" : null
},
{
"_id" : [{ start: "2021-01-08", "end": "2021-01-14" }],
"averageValue" : 28.1875
}]