ProgrammerGuide.Net | Step by Step Programmer Guide

How to save a Ducument to MongoDB?

Here’s how you save a document to MongoDB:

db.scores.save({a: 99});

This command saves the document ‘{a: 99}’ to the ‘scores’ collection. To query the document, we do

db.scores.find();

Please click here for related products on Amazon!

Jayashee

Add comment

Want to Check Celebrities News?