Database
[{_id:1,my_array:[{id:2,name:"foo"},{id:3,name:"foo2"},{},{id:4,name:"foo4"},]/**more attributes*/}]
Query
db.collection.aggregate([{$project:{my_array:{$filter:{input:"$my_array",as:"elem",cond:{$ne:[{},"$$elem"]}}}}}])