I need to retrieve slugs for articles in my database based on their event dates.
"eventDate" : {
"day" : "21",
"month" : "04"
},
"slug": "some-slug"
...
The input I have is
[{day: '01', month: '02'}, {day: '02', month: '02'}]
and I want to find all articles that match this criteria.
I attempted the following query:
.find({'eventDate': { $in: myArrayOfObjects}}, {slug: 1})
How can I correct this query to get the desired results?