I have a database of users like this:
{
"_id": 1,
"name": "Carlo",
"cars": [{
"type": "sport",
"score": 10
}, {
"type": "hatchback",
"score": 5
}, {
"type": "family",
"score": 4
}, {
"type": "family",
"score": 3
}]
}
How can I choose all of the users whose hatchback has score more than 6? So, query has to find in array of cars some object, which has a property 'type' with value 'hatchback' and 'score' more than 6