node js important topic

 const getDocument= async()=>{

try{

1...const result=awit STUDET//(modulename).find({name:"gaurav"})

2.....const result=awit STUDET//(modulename).find({name:"gaurav"}).select({name:1})

3.....const result=awit STUDET//(modulename).find({name:"gaurav"}).select({name:1}).limit(1)

console.log(result);}

catch(err){

console.log(err);

}

...findbyidandupdate....it can find and get the result and do update in same time...

2 property we have to add same like we did in connection time..


Comments

Popular posts from this blog

interview questions js[ Anurag Singh ProCodrr]

reactnative_creation