Top "Aggregation-framework" questions

The MongoDB Aggregation Framework provides a means to reshape and aggregate data in MongoDB 2.2+.

Converting string to date in mongodb

Is there a way to convert string to date using custom format using mongodb shell I am trying to convert "21/…

mongodb mongodb-query aggregation-framework
How to aggregate sum in MongoDB to get a total count?

For some collection with a field { wins: Number }, how could I use MongoDB Aggregation Framework to get the total number …

mongodb aggregation-framework
Convert ObjectID (Mongodb) to String in JavaScript

I want to convert ObjectID (Mongodb) to String in JavaScript. When I get a Object form MongoDB. it like as …

javascript mongodb aggregation-framework
Return only matched sub-document elements within a nested array

The main collection is retailer, which contains an array for stores. Each store contains an array of offers (you can …

mongodb mongodb-query aggregation-framework
What's the $unwind operator in MongoDB?

This is my first day with MongoDB so please go easy with me :) I can't understand the $unwind operator, maybe …

mongodb aggregation-framework
How do I use aggregation operators in a $match in MongoDB (for example $year or $dayOfMonth)?

I have a collection full of documents with a created_date attribute. I'd like to send these documents through an …

mongodb aggregation-framework
Search on multiple collections in MongoDB

I know the theory of MongoDB and the fact that is doesn't support joins, and that I should use embeded …

mongodb mongodb-query aggregation-framework
How to get all the values that contains part of a string using mongoose find?

I have the following problem retrieving data from MongoDB using mongoose. Here is my Schema: const BookSchema = new Schema( { _id:…

regex node.js mongodb mongodb-query aggregation-framework
MongoDB aggregation framework match OR

Is it possible to do an OR in the $match? I mean something like this: db.articles.aggregate( { $or: [ $match : { …

mongodb aggregation-framework
Multiple join conditions using the $lookup operator

Have the two following collections: // collection1: { user1: 1, user2: 2, percent: 0.56 } // collection2: { user1: 1, user2: 2, percent: 0.3 } I want to join these two collections …

mongodb join mongodb-query aggregation-framework