async function getCourses() {
return await Course.find({author:'NARESH RAMINI'});
}
async function run(){
const result=await getCourses();
console.log(result);
}
run();
Below is the Terminal's output for the above code for retrieving documents from mongodb
Terminal populates with additional information
What can be done to make the terminal show only or populate only queried documents from mongoDB?