{
'id' : 1,
'properties':{
'type': [[0.05, 'education'],[0.6, 'health'],[0.9, 'math']]
}
},
{
'id' : 1,
'properties':{
'type': [[0.05, 'education'],[0.01, 'health'],[0.9, 'math']]
}
},
How could you query based on two value parameters in nested array of arrays? Goal would be to return the 1st document with properties.type[0] > 0.5, and properties.type[1] == 'health'.
Have tried the following query with no luck.
db.collection.find({'properties.type': {'$elemMatch':{'$elemMatch':{'$all': [{ "$gt": 0.5, "$lt": 1 },'health']}}}})