Not sure what you language implementation is but the basic concept is:
var result = []
db.users.find().forEach(function(u) { result.push(u.text) })
And the returned value to result
is:
["Hey","Hi","Hello","yes"]
More Related Contents:
- Mongoose and multiple database in single node.js project
- MongoDB dot (.) in key name
- What is the difference between id and _id in mongoose?
- Best Model for Representing Many to Many relationships with attributes in MongoDB
- How to properly reuse connection to Mongodb across NodeJs application and modules
- Possibility of duplicate Mongo ObjectId’s being generated in two different collections?
- Implementing pagination in mongodb
- How to sort array inside collection record in MongoDB?
- How do I query referenced objects in MongoDB?
- Mongoose auto increment
- Leaderboard ranking with Firebase
- Mongoose, Select a specific field with find
- Mongoose difference between .save() and using update()
- Get the _id of inserted document in Mongo database in NodeJS
- Is there a way to ‘pretty’ print MongoDB shell output to a file?
- How can I promisify the MongoDB native Javascript driver using bluebird?
- When to close MongoDB database connection in Nodejs
- How to exclude some fields from the document
- Mongoose subdocuments vs nested schema
- Why is an _id with ObjectID added to when using MongoDB’s $push to add new object to an array?
- Mongoose.js: Find user by username LIKE value
- How to stop insertion of Duplicate documents in a mongodb collection
- Create an ISO date object in javascript
- Is mongodb running?
- Getting timestamp from mongodb id
- Storing data stream from POST request in GridFS, express, mongoDB, node.js
- MongoDB normalization, foreign key and joining
- Does MongoDB have a native REST interface?
- Cannot connect to MongoDB because of wrong URI
- Read and write to an access database using Javascript