Database

[{"_id":1,"shifts":[{"_id":2},{"_id":3}]}]

Query

db.collection.find({"shifts._id":2})

Result