skip to Main Content

MongoDB $lookup on array of objects with reference objectId

I have Orders collection and iam getting the data from it as shown below: [ { "_id": "628216b7b30bb8aa80c8fd1a", "promotionsDetails": { "companyTotalPrice": 27, "promotionsData": [ { "_id": "621de063bb5f9f0bf510897f", "price": 27, "companyId": "621dd85eb45ca2ae292d9a36" }, { "_id": "621de063bb5f9f0bf510897d", "price": 19, "companyId": "621dd85eb45ca2ae292d9a32" }…

VIEW QUESTION

Mongodb – I got following error while developing in MEAN stack : Cannot find module 'mongojs'

I ran command: node server in bash on Ubuntu and below is the error I got: node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'mongojs' Require stack: - /home/nishil/Documents/contactListApp/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require…

VIEW QUESTION

MongoDB – Filter array with array

I have one data example like this one in MongoDB. { id: 628a8683fc489c315b330ade, examName : 'Final Exam', schedule: { scheduleDate : '2021-10-18T17:00:00.000+00:00' scheduleName : 'Package Test' package:[ { exclude_question:[1,2], namePackage:testing packageId:628a89c2fc489c315b330b01 } ] }, question:[ { id:1, question:'hello can u…

VIEW QUESTION
Back To Top
Search