hello-mongoose: MongoLab MongoDB Mongoose Node.js Demo on Heroku
See the supporting article on the Dev Center to learn more about data modeling with Mongoose.
All Documents in MonogoDB database
[
{
"age": 25,
"_id": "51c1efc3fc86e20200000001",
"__v": 0,
"name": {
"first": "John",
"last": "Doe"
}
},
{
"age": 65,
"_id": "51c1efc3fc86e20200000002",
"__v": 0,
"name": {
"first": "Jane",
"last": "Doe"
}
},
{
"age": 45,
"_id": "51c1efc3fc86e20200000003",
"__v": 0,
"name": {
"first": "Alice",
"last": "Smith"
}
}
]
3 documents.
Queried (name.last = "Doe", age >64) Documents in MonogoDB database
[
{
"age": 65,
"_id": "51c1efc3fc86e20200000002",
"__v": 0,
"name": {
"first": "Jane",
"last": "Doe"
}
}
]
1 documents.
Demo code available at github.com