skip to Main Content

Mongodb – How to filter data in collection containing documents with 3 level nested arrays depending on the values in the first and last nested array mongo

I appreciate any help in such case. Collection in MongoDB (now only 4 documents for demonstration purpose): { "_id" : ObjectId("62684847e9594c65cbaa5d85"), "agentId" : NumberInt(1), "agentName" : "Yardi Gaondi", "policyList" : [ { "receivedDate" : ISODate("2022-03-23T04:46:15.000+0000"), "policyStatusDetail" : [ { "policyStsCode"…

VIEW QUESTION

Is there any substitute of $arrayToObject in MongoDb

I have a requirment of inverting an object keys & values. I have following type of data: [ "elements": { "title": "elem_1_6_title", "sub_title": "elem_1_6_sub_title", "media": "elem_1_6_media", "button": "elem_1_6_button", "give_us_call": "elem_1_6_give_us_call" }, "elements": { "title": "elem_1_6_title", "sub_title": "elem_1_6_sub_title" }, "elements": {}…

VIEW QUESTION

MongoDB : Query documents by values in array

I have those documents : {"_id" : 1, "actors" : [{"matricule" : "AVB", "name":"XXX"}, {"matricule" : "AVB", "name":"YYY"}]} {"_id" : 2, "actors" : [{"matricule" : "PMH", "name":"FFF"}, {"matricule" : "BNG", "name":"HHH"}]} I would like to get only the first document…

VIEW QUESTION

MongoDB lookup in multi label nested array

I am very new in MongoDB. I am trying to make lookup in multi label nested array. My data is looks like bellow. [     {         "_id": "621eedae92979fd8f0e9451d",         "name": "Pallab Koley",         "shifts": {             "_id": "62636b9fcbda6d2b17f5cae0",            …

VIEW QUESTION
Back To Top
Search