Gunakan $map di agregasi seperti ini :
db.collection.aggregate({"$project":{"resources":{"$map":{"input":"$resources","as":"el","in":"$$el.mediatype"}}}})
Gunakan $map di agregasi seperti ini :
db.collection.aggregate({"$project":{"resources":{"$map":{"input":"$resources","as":"el","in":"$$el.mediatype"}}}})