Skip to content Skip to sidebar Skip to footer
Showing posts with the label Mongodb Query

Find A Document Based On A Reference To The Parent In The Child

There are 2 collections Movie and Rank Movie .This 2 collections having referenced relationship . … Read more Find A Document Based On A Reference To The Parent In The Child

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

Using $graphlookup To Traverse A Nested Data Structure In Mongodb

I have the following schema: const MenuSchema = new mongoose.Schema({ name: String, type: Strin… Read more Using $graphlookup To Traverse A Nested Data Structure In Mongodb

Object.keys, How To Get A List Of Keys In Mongodb

{ '_id': '1', 'style': '13123', 'category': 'dress'… Read more Object.keys, How To Get A List Of Keys In Mongodb

Reshape Array That Is Stored In A Collection And Export To Csv

I have a collection of Facebook Page Likes (titled pagelikes) that is stored in a Mongo database/JS… Read more Reshape Array That Is Stored In A Collection And Export To Csv

Collect Distinct Field Names At Nested Level With Specific Condition

I have problem statement, in which i need all the field names at child level of 'config.first.… Read more Collect Distinct Field Names At Nested Level With Specific Condition

Mongodb Where Clause

I have mongoDB 'users' collection in JSON format and I want to return all the data having p… Read more Mongodb Where Clause

Search And Replace In Mongodb?

Given a set of 100 posts, and each post having a a body attribute with post content and inside that… Read more Search And Replace In Mongodb?

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 Save 1 Million Records To Mongodb Asyncronously?

I want to save 1 million records to mongodb using javascript like this: for (var i = 0; i Solution … Read more How To Save 1 Million Records To Mongodb Asyncronously?

Calling Db.system.js Function In $where

As a basic example, I have this function saved: db.system.js.save({_id: 'sum', value: funct… Read more Calling Db.system.js Function In $where

Limit Number Of Values In A Field Using MongoDB

My collection has an array of values, but I'd like to retrieve only the last X. Example: db.col… Read more Limit Number Of Values In A Field Using MongoDB

Object.keys, How To Get A List Of Keys In Mongodb

{ '_id': '1', 'style': '13123', 'category': 'dress'… Read more Object.keys, How To Get A List Of Keys In Mongodb

How Select Data With Given Condition

I have following data. { 'name' : 'Maria', 'facebook' : [ … Read more How Select Data With Given Condition