Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.getCollection('tost').aggregate(
- [
- {
- "$group":{
- "_id": "$_id",
- "doc_info":{
- "$first": "$doc_info"
- },
- "wa_count": {
- "$first": {
- "$size": "$wa"
- }
- },
- "ax_count": {
- "$first": {
- "$size": "$wa.ax"
- }
- }
- }
- }
- ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement