Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"_id":1,c:[{d:[{b:[{a:1},{a:2},{a:2},{a:2}]}]}]}]
Query
db.collection.aggregate([])/*** count() how many are the "c.d.b.a":2 in the collection* Final result: {"a":3}*/
Result