Database

[{_id:1,name:"Student",tasks:[{month:1,year:2018}]}]

Query

db.collection.find({"tasks.month":1,"tasks.year":2018},{"tasks.$":1})

Result