Database

[{"_id":"test_id","name":"customname","timestamp":"2010-10-10 10:00:01","customarray":[{"my_id":1,"value":23},{"my_id":2,"value":16}]}]

Query

db.collection.aggregate([{"$unwind":"$customarray"},{"$match":{"customarray.my_id":1}},{"$project":{"_id":0,"value":"$customarray.value"}}])

Result