I'm working to count total rows, in case the column name is nama_materi with condition = "HTML".
Here's my code:
getTotalListHTML: (req, res, next) => {
modelsListMateris.find({nama_materi:'HTML'}, (err, result) => {
if (result) res.send(result);
else res.send(err);
})
},
I expect to add method count() after find statement, but it's not working. Thank you for helping me!