Probably best handled with a JavaScript evaluation using $where:
db.colletion.find({
"$where": function() {
return this.mylist.filter(function(el) {
return el.value == 1;
}).length >= 1;
}
})
Or currently not so greatly handled in aggregation:
db.collection.aggregate([
{ "$redact": {
"if": { "$eq": [ { "$ifNull": [ "$value", 1 ] }, 1 },
"then": "$$DESCEND",
"else": "$$PRUNE"
}},
{ "$redact": {
"if": { "$gt": [{ "$size": "$mylist" }, 1 ] },
"then": "$$KEEP",
"else": "$$PRUNE"
}}
])
Or better handled in the future with $filter:
db.collection.aggregate([
{ "$redact": {
"if": {
"$gt": [
{ "$size": { "$filter": {
"input": "$mylist",
"as": "el",
"cond": {
"$eq": [ "$$el.value", 1 ]
}
}}},
1
]
},
"then": "$$KEEP",
"else": "$$PRUNE"
}}
])
Where that latter operator is not available yet until the next release of MongoDB. But in general you want to be able to filter out and "count" the occurences of matches. These are a couple of ways to do this.
$unwindand$project. Which is not a good solution. Will get better in the next MongoDB release though.