If I have documents that look like this:
{
"items": [
{
"key": null
}
]
},
{
"items": [
{
"key": 2
}
]
}
]
... how can I find the document with 'key' set to null?
This is the query I've been trying, but I don't understand why it's returning both documents:
db.collection.find({
"items.0.key": {
$eq: null
}
})