I am trying to get values from a mongodb table which stores data about stock taking dates in a shop(the date is stored as string) along with python.
the data stored in the table:
{
"_id" : ObjectId("5645f0443f32df13e0dc786e"),
"RequiredDate" : "28-9-2015",
"Name": "xyz"
}
{
"_id" : ObjectId("5645f0c73f32df062064a0f6"),
"RequiredDate" : "29-9-2015",
"Name": "abc"
}
I would like to find the name of the products which are required on both days 28-9-2015 & 29-9-2015.
Right now do it individually like this
db.stockdate.find({"RequiredDate": "28-9-2015"})
db.stockdate.find({"RequiredDate": "29-9-2015"})
Can i do these in a single query, Is there any option for that? like giving both date in a single query and get the same result which i got with two query.