With this structure, how should the mongose query statement be written?

clipboard.png

requirements, filter the time range of the data and describe the picture

  meta: {
    createAt: {
      type: Date,
      dafault: Date.now()
    },
    updateAt: {
      type: Date,
      dafault: Date.now()
    }
  }
Mar.30,2021

//createAt2018-07-25
yourModel.findOne(
    {"meta.createAt":{$gte:new Date("2019-07-25"),$lt:new Date("2019-07-26")}}
    ,callback
);
Menu