search

Home  >  Q&A  >  body text

How does mongodb count the number of subdocuments?

As mentioned.
MongoDB can use the count method to count the number of documents in a collection, which is a collection method, but how to count the number of embedded sub-documents? I checked the official documentation and couldn't find a suitable method in the aggregation framework. I hope someone can give me some advice.

高洛峰高洛峰2804 days ago626

reply all(0)I'll reply

No reply
  • Cancelreply