Database

[{"_id":1,"items":[{x:"one",y:"two",z:"three"},{x:"four",y:"five",z:"six"}]}]

Query

db.collection.aggregate([{$match:{_id:1}},{$project:{index:{$indexOfArray:["$items.y","two"]}}}])

Result