Database

[{"_id":ObjectId("5ff4b728b6af610f0851d2a6"),"totalScore":500,"totalCompleted":100,"monthly":[{year:2021,month:8,attempted:10,completed:5,score:20,}],},]

Query

db.collection.aggregate([{$project:{totalScore:1,monthly:{$map:{input:{$filter:{input:"$monthly",as:"item",cond:{$eq:["$$item.month",8]}}},as:"item",in:{score:"$$item.score"}}}},},])

Result