Reputation: 18619
I have a schema as follows
var S = new Schems({
f : Mixed
})
mongoose.model('collection', S);
How do I query the 'collection' such that i find the documents where f
is ANY mongo ObjectId
?
eg if '
collection' = [{ f: ObjectId('549138f19f52f268c717a8a2'), _id : 1 },
{ f : ObjectId('549139129f52f268c717a8a4'), _id : 2 }, { f : false, _id :3 } ]
the result should have with _id 1 and 2
Upvotes: 0
Views: 336