Database
[{"_id":35,"scores":[{"type":"quiz",score:1},{"type":"homework",score:2},{"type":"exam",score:3}]}]
Query
db.collection.update({"_id":35},[{"$set":{"scores":{"$map":{input:"$scores",as:"s",in:{$cond:{if:{"$eq":["$$s.type","homework"]},then:{"type":"homework","score":{"$add":["$$s.score",10]}},else:{$cond:{if:{"$eq":["$$s.type","exam"]},then:{"type":"exam","score":{"$add":["$$s.score",15]}},else:"$$s"}}}}}}}}],{multi:false})