Database

[{"_id":"CA","properties":[{"property_type":"Camper/RV","quantity":1},{"property_type":"Hostel","quantity":2}]},{"_id":"BR","properties":[{"property_type":"Guest suite","quantity":3},{"property_type":"Bed and breakfast","quantity":7}]}]

Query

db.collection.aggregate([{"$unwind":"$properties"},{"$sort":{"properties.quantity":-1}},{"$group":{"_id":"$_id","most_type":{"$first":"$properties.property_type"},"most_number":{"$first":"$properties.quantity"},"least_type":{"$last":"$properties.property_type"},"least_number":{"$last":"$properties.quantity"}}}])

Result