Finding documents in mongodb collection by order of elements index of array field
Array field in collection: "fruits": [ "fruits": [ "fruits": [ {"fruit1": "banana"}, {"fruit2": "apple"}, {"fruit3": "pear"}, {"fruit2": "apple"}, {"fruit4": "orange"}, {"fruit2": "apple"}, {"fruit3": "pear"}, {"fruit1": "banana"}, {"fruit4": "orange"}, {"fruit4": "orange"} {"fruit3": "pear"} {"fruit1": "banana"} ] I need to find those…