0

I have following scheme in my mongoDB

{ 
  _id: ObjectId(),
  stamp: 1649843113567, 
  value: 20.5 
}

Now I need to know if there are documents for a array of timestamps, e.g:

[
  "1649832333744",
  "1649843113567",
  "1649847613781"
]

Is there a possibility to manage this in one query, so I have a result for every stamp?

don huan
  • 13
  • 3
  • `db.collection.find({stamp:{$in:["1649832333744","1649843113567","1649847613781"].map(t=>parseInt(t))}})` – chridam Apr 13 '22 at 10:47

0 Answers0