I have documents that have the following structure:
{
"somekey1": "somevalue1",
"data" : [
[
{
"value" : 0.807689530228178,
"unit" : "mL"
},
{
"value" : 0.7392892800962352,
"unit" : "mL"
},
],
[
{
"value" : 0.8314139708574444,
"unit" : "mL"
},
{
"value" : 0.09766834482756892,
"unit" : "mL"
}
],
[
{
"value" : 0.3821786847386669,
"unit" : "mL"
},
{
"value" : 0.18408410591658442,
"unit" : "mL"
}
]
]
}
What is the most efficient way to return all value/unit objects with value in a certain range? (ex. > 0.7?) Tried searching but didn't come up with anything helpful. Can it be done with a single find or aggregate operation?
{ "value" : 0.807689530228178, "unit" : "mL" }, { "value" : 0.7392892800962352, "unit" : "mL" }, { "value" : 0.8314139708574444, "unit" : "mL" } }