Hello I'd like to exclude some fields by query,. Im using nodejs
public async getDoc() {
return new Promise((resolve, reject) => {
this.database.collection('users').find({email: "value3"}, {password: 0}).toArray((err, result) => {
if(err) {
reject(err)
}
resolve(result);
});
})
}
but in the result set I keep getting password field..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…