how to get the biggest number value mongojs express app code example
Example: mongoose max record
const maxQuery = Goods.find({}).sort({ price: -1 }).limit(1).then(goods => goods[0].price);
const maxQuery = Goods.find({}).sort({ price: -1 }).limit(1).then(goods => goods[0].price);