Use mongoose to find in an Array of Objects

Introduction In this tutorial we will discuss how to use mongoose to find in an array of objects. Searching in an Array of Objects In the programming world, arrays are one of the most widely used data structures. Arrays are used on both client-side and server-side. They are heavily used in NoSQL databases also. In … Continued

The Mongoose and NodeJs History

Introduction In this article we hope to explain some of the history behind NodeJS, MongoDB, Mongoose, and how they became a common architecture among web developers. Birth of NodeJS Javascript is one of the most popular programming languages in this world. It is one of the three core technologies of the World Wide Web(WWW). When … Continued

Node Js with MongoDB Query Examples for Developers

Introduction In this tutorial our hope is to demonstrate some basic query examples. Specifically we want to demo Node Js with MongoDB query examples that can be used as a starting point for understanding more complex queries. Let’s jump in! MongoDB provides several methods that can be used with collections. Almost each of these methods … Continued

A NodeJS mongoose Schema Example

Introduction In this tutorial we hope to show a NodeJS with mongoose schema example as a starting point for developers setting up this type of architecture. MongoDB is one of the most popular NoSQL databases around. It is fairly easy to use and understand when compared with SQL databases. But it is a schemaless database. … Continued

How to use Node JS and mongodb to Query Count

Introduction In this article we’ll be covering how to find the number of documents of a MongoDB collection. Specifically we will be using Node JS and MongoDB to query the count of a collection. There can be multiple MongoDB databases. Each database can contain several collections and each of these collections can contain hundreds of … Continued

Using nodejs and mongoose to update array

Introduction Working with arrays can be complicated. Updating can be more complicated. One should work carefully while performing update operations on arrays. Mongoose provides a few operators to update arrays such as $addToSet, $push, $pop, etc. In this article, we will discuss how to use such operators to perform update operations on arrays in nodejs. … Continued

$all in mongoose

Introduction Arrays are one of the most commonly used data structures in the programming world. They are perfect to store elements of the same data types. We can store any type of data in arrays. While working with databases, we may need to store data in an array. For example, the following MongoDB documents contain … Continued

Push and pop in mongoose

Introduction Arrays are one of the most commonly used data structures in the programming world. They are perfect to store elements of the same data types. We can store any type of data in arrays. While working with databases, we may need to store data in an array. For example, the following MongoDB documents contain … Continued

and in mongoose

Introduction Every Mongoose method has a query part. The query consists of conditions according to which the documents will be matched. The query can be simple and it can be complicated as well. Observe the following query. 1{ "breed" : "Labrador" } The above query will match all the documents where the value of the … Continued

How to use mongoose with Node

Introduction Node.js and MongoDB are part of MEAN and MERN stack. The pair is heavily used while building backends for web applications. MongoDB is a NoSQL database and it is quite popular for its simplicity. It is very simple to install and implement. With Node.js, we can easily perform various operations on MongoDB databases. These … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.