{
"branchId": "NLR001",
"monthYear": [
{
"dateMonthYear": "1-01-2023",
"standardId": [
{
"standardId": "UKG",
"stAttendanceStatus": [
{
"stRollNo": "RoleNumber-000",
"attendanceStatus": "true"
}
]
}
]
}
]
}
above is my collection
Question: Find all students with "dateMonthYear": "1-01-2023"
I added $match as below: I am getting other Dates lists also "2-01-2023"
and "2-01-2023"
etc…
How to find only collects with "monthYear.dateMonthYear"
: "1-01-2023"
{ "branchId": "NLR001" },
{ "monthYear.dateMonthYear": "1-01-2023" }