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

Update array object mongoDB

I have an array of objects and would like to update the count of the object where categoryId = "menu2" and subCategoryId = "1". in my mongodb i currently have two records in the array: { "_id": "xyz", "badges": [{…

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
Back To Top
Search