I have queried mongodb by using aggregate function and got two fields in the output. The result of my db.Collection.aggregate(..) looks like the below:
{
"_id" : NumberLong(203440),
"date" : ISODate("2013-05-11T00:00:00Z")
}
{
"_id" : NumberLong(203520),
"date" :ISODate("2013-01-05T00:00:00Z")
}
{
"_id" : NumberLong(203970),
"date": ISODate("2013-01-11T00:00:00Z")
}
{
"_id" : NumberLong(203660),
"date" : ISODate("2013-01-11T00:00:00Z")
}
{
"_id" : NumberLong(203360),
"date" : ISODate("2013-01-11T00:00:00Z")
}
How do I get the records in the collection for which these two fields are true?(in a single query)
i.e If each record in my collection has the fields data,_id, x, y, z, a , b and c, how do I fetch list of records for which the date and _id are equal to the above result of aggregate?