Mongodb findOne and then project array element (filter out certain indexes from the array)

after getting a document based on the “_id”, how can i filter out certain indexes from the array.
say this array is part of the found doc.

library.findOne({_id: ID})
{
…,
books: [{book: “A”, genre: “action”}, {book: “A”, genre: “fantasy”}]
}

You need a projection with $filter. However I do not know if you can do that in findOne() so you might need to aggregate instead.