要限制字段,您必须使用
fieldsoption(不知道新更新):
dbase.collection("customers").find( {}, {fields:{_id: 0}} ).toArray(function(err, result) { if (err) throw err; console.log(result); db.close(); });更新:
对于版本> 3,您必须使用
projection选项:
dbase.collection("customers").find( {}, {projection:{_id: 0}} ).toArray(function(err, result) { if (err) throw err; console.log(result); db.close(); });


