SHARE
TWEET

mv

obez Aug 5th, 2016 (edited) 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.getCollection('tost').aggregate(
  2. [
  3.     {
  4.         "$project":{
  5.             "_id": "$_id",
  6.             "doc_info": 1,
  7.             "wa_count": {
  8.                     "$size": "$wa"
  9.             },
  10.             "ax_count": {
  11.                 "$sum":{
  12.                     "$map":{
  13.                         "input": "$wa.ax",
  14.                         "as": "sub",
  15.                         "in": {
  16.                             "$size": "$$sub"
  17.                         }
  18.                     }
  19.                 }
  20.             }
  21.         }
  22.     }
  23. ])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top