Skip to content Skip to sidebar Skip to footer
Showing posts with the label Aggregation Framework

Mongodb - Unwinding Nested Subdocuments

For the following dataset example: lists { _id: 1, included_lists: [ 2 ], items: [ 'i1' ]} … Read more Mongodb - Unwinding Nested Subdocuments

Possible To Compare Date Strings In Mongodb?

I have a collection that contains documents with a date attribute like so: { title: 'whateve… Read more Possible To Compare Date Strings In Mongodb?

How To Get Data From Mongodb To Simple Array Using Node.js And Mongoose?

Let's say this is my MongoDB schema: var shopSchema = new mongoose.Schema({ nameSho… Read more How To Get Data From Mongodb To Simple Array Using Node.js And Mongoose?

Aggregate Multiple Arrays Into One Huge Array With Mongodb

I got a collection with documents such as those: { '_id': 0, 'pictures': [ … Read more Aggregate Multiple Arrays Into One Huge Array With Mongodb

Is It Possible To Use Query Projection On The Same Collection That Has A $elemMatch Projection?

I understand that you can limit the items in a subcollection array using $elemMatch as a projection… Read more Is It Possible To Use Query Projection On The Same Collection That Has A $elemMatch Projection?

How To Find Documents With Exactly The Same Array Entries As In A Query

I have documents in a collection, looking like this: [ { userId: 1, itemsIds: [399957190,… Read more How To Find Documents With Exactly The Same Array Entries As In A Query