db.getCollection('books').find({_id: { $lt: ObjectId("5cd2ed674fd20c33a5ecb886")}}).length()

# 先要找到该项,然后通过ObjectId找到小于它的数量

相关文章:

  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-10-06
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案