skip to Main Content

MongoDB lookup (join) with field in double nested array

With a MongoDB collection name department with the following structure: { "_id":99, "name":"Erick Kalewe", "faculty":"Zazio", "lecturers":[ { "lecturerID":31, "name":"Granny Kinton", "email":"[email protected]", "imparts":[ { "groupID":70, "codCourse":99 } ] }, { "lecturerID":36, "name":"Michale Dahmel", "email":"[email protected]", "imparts":[ { "groupID":100, "codCourse":60 } ] }…

VIEW QUESTION

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