Category "mongodb-query"

How to read a specific key-value pair from mongodb collection

If I have a mongodb collection users like this: { "_id": 1, "name": { "first" : "John", "last" :"Backus" }, } How do I retrieve name.first from

mongodb update/upsert that adds data to the existing document instead of replacing data in an existing document

I am using an upsert using mongodb's Jensseger PHP library. Every time I add new data to the document it updates the value of the field if the field names are

How to find items in a collections which are not in another collection with MongoDB

I want to query my mongodb to perform a non-match between 2 collections. Here is my structure : CollectionA : _id, name, firstname, website_account_key, emai

In MongoDB, method to keep the previous value of a field in a different field while updating an object?

Say I have an object with field state, I want to update this field, while keeping the previous value of state in previous_state field. First, I have tried to ma

MongoDB Merge Equivalent Collections

I have two collections with same structure and want to merge them in aggregation result and query & sort over them after merging. E.g.; First collection:

MongoDB Driver Builders<dynamic> dont work on equal to date

I am unable to get the result I wanted when I try to get Date equal to. FilterDefinition<dynamic> searchFilter = FilterDefinition<dynamic>.Empty; st

MongoDB Driver Builders<dynamic> dont work on equal to date

I am unable to get the result I wanted when I try to get Date equal to. FilterDefinition<dynamic> searchFilter = FilterDefinition<dynamic>.Empty; st