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