Database

[{"_id":1,"buyers":[{"userId":"1234","Prop1":"AAaaa"},{"userId":"2312","Prop1":"Abba"},{"userId":"12345","Prop1":"AAaaa","quantity":3},{"userId":"23125","Prop1":"Abba","quantity":5}]}]

Query

db.collection.aggregate([{$addFields:{sumBought:{$sum:{$map:{input:"$buyers",in:{$ifNull:["$$this.quantity",1]}}}}}}])

Result