skip to Main Content

Match beginning of array with another array in mongodb

Let's say I have some documents that have an array like this: [ { "_id": ObjectId("5a934e000102030405000000"), "letters": ["a","b","c","d"] }, { "_id": ObjectId("5a934e000102030405000001"), "letters": ["a","b"] }, { "_id": ObjectId("5a934e000102030405000002"), "letters": ["a"] }, { "_id": ObjectId("5a934e000102030405000003"), "letters": ["x","a","b"] } ] I want…

VIEW QUESTION
Back To Top
Search