Let's say I have a collection, like so:
[
{ "_id": "101", parts: [1.2, 2] },
{ "_id": "102", parts: [2, 3.5] },
{ "_id": "103", parts: [4.1, 10] }
]
What is the query I need to write so that each item in the array parts is greater than equal to the item with the same array index in an input array [1, 5]?
output would be:
[
{ "_id": "103", parts: [4.1, 10] } // 4.1 >= 1 and 10 >= 5
]
is this possible? any idea?
partsarray and the input array have same number of elements?