Database

[{"posts":[{name:"post1"},{name:"post2"}]},]

Query

db.collection.find({"posts.name":"post1"},{"posts.name.$":1})

Result