skip to Main Content

Mongodb – aggregate match subarray

I trying to match the data in Subarray for some reason it is grouped like this. Data : { "_id": 1, "addresDetails": [ [ { "Name":"John", "Place":"Berlin", "Pincode":"10001" }, { "Name":"Sarah", "Place":"Newyork", "Pincode":"10002" } ], [ { "Name":"Mark", "Place":"Tokyo", "Pincode":"10003"…

VIEW QUESTION

Mongodb – Query document count by multiple ranges returning range start/end with matching element count

I've been trying to create a query on documents like these: [ { "timestamp": new ISODate('2020-01-01T00:00:00'), "objectId": "Id_A", "locationId": "Location_A" }, { "timestamp": new ISODate('2021-01-01T00:00:00'), "objectId": "Id_A", "locationId": "Location_A" }, { "timestamp": new ISODate('2022-01-01T00:00:00'), "objectId": "Id_A", "locationId": "Location_B" }, {…

VIEW QUESTION
Back To Top
Search