In this post, I show how to manipulate data in Meteor and MongoDB for apps under development.
The example used in this post in on github at simple-todos.
Mongo Commands Summary
Deleting all MongoDB data
In a terminal, I start my simple-todos app with the meteor command:
2. Mongo Shell
I start a new terminal, go the app folder and enter the command meteor mongo.
meteor mongo starts mongo shell for the app.
3. Mongo Commands
This section shows the mongo commands and the results.
users collection is created by meteor account system and has the id data for each user.
db.tasks.find() lists all the documents in a collection.
Nested json query:
Fields in documents are modified with the
update command and the
count command counts the documents:
drop command empties a collection:
4. Mongo Commands Summary
5. Deleting all MongoDB data