{
"name": "one",
"age": "two",
"params": [
{
"one": true,
"two": "string",
"three": 1
},
{
"one": true,
"two": "string",
"three": 1
},
{
"one": false,
"two": "string",
"three": 1
}
]
}
{
"name": "one",
"age": "two",
"two": "string",
"three": 1
}
.aggregate([
{$unwind: "$params"},
{$match: {"params.one": true}},
{$project: {
_id: 0,
name: 1,
age: 1,
two: "$params.two",
three: "$params.three"}
}
])