Database
db={"properties":[{"_id":1,"city":"paris","tags":[{"_id":1,/** seen*/"count":43},{"_id":2,/** liked*/"count":32}]},{"_id":2,"city":"leon","tags":[{"_id":1,/** seen*/"count":17}]}],"tags":[{"_id":1,"name":"seen"},{"_id":2,"name":"liked"},{"_id":3,"name":"saved"}]}
Query
db.properties.aggregate([])