I’m trying to use the sort feature when querying my mongoDB, but it is failing. The same query works in the MongoDB console but not here. Code is as...
I’ve exported the database on the server using mongodump command and dump is stored in .bson file. I need to import that in my local server using mongorestore command....
I have a JSON file consisting of about 2000 records. Each record which will correspond to a document in the mongo database is formatted as follows: {jobID:"2597401", account:"XXXXX", user:"YYYYY",...
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by...
Trying to import a CSV with contact information: Name,Address,City,State,ZIP Jane Doe,123 Main St,Whereverville,CA,90210 John Doe,555 Broadway Ave,New York,NY,10010 Running this doesn’t seem to add any documents to the database:...
I’ve seen using strings, integer timestamps and mongo datetime objects. 4 Answers 4
How can I store images in a MongoDB database rather than just text? Can I create an array of images in a MongoDB database? Will it be possible to...
let’s say I run this query in Mongoose: Room.find({}, (err,docs) => { }).sort({date:-1}); This doesn’t work! 11 Answers 11
Until now I have not been specifying a MongoDB data directory and have had only one 30 GB primary partition. I just ran out of space and added a...
What command should I use to create a MongoDB dump of my database? 20 Answers 20