获取您的 自己的 Node 服务器
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://127.0.0.1:27017/mydb";

MongoClient.connect(url, function(err, db) {
  if (err) throw err;
  //Return only the "name" field in the result:
  db.collection("customers").find({}, { projection: { _id: 0, name: 1 } }).toArray(function(err, result) {
    if (err) throw err;
    console.log(result);
    db.close();
  });
});

              
[
{ name: 'John' },
{ name: 'Peter' },
{ name: 'Amy' },
{ name: 'Hannah' },
{ name: 'Michael' },
{ name: 'Sandy' },
{ name: 'Betty' },
{ name: 'Richard' },
{ name: 'Susan' },
{ name: 'Vicky' },
{ name: 'Ben' },
{ name: 'William' },
{ name: 'Chuck' },
{ name: 'Viola' }
]