i've fetch data of single model from the database but i'm getting problem while fetching multiple model from the database. while fetching model everything related to model comes in return but i want only id and datas this is my code
router.get('/',(req,res) =>{
const how = Howitworks.find().lean();
const value = Slider.find().lean();
console.log(how)
res.render('index', {how: how, value: value});
})
this is my code for fetching single model
router.get('/',(req,res) =>{
Howitworks.find((err,docs)=>{
if(!err){
res.render("index",{
list:docs
})
}
else {
console.log("error in retriving hoiw it works list: "+err)
}
}).lean()
})
is there any way to fetch both model?