let limit = parseInt(req.body.limit) || 10
let page = parseInt(req.body.page) - 1 || 0
var query = {};
let users = await Users.find({}).sort({ createdAt: -1 }).skip(limit * page).limit(limit).select("fields you want to select separated by space")
const count = await Users.countDocuments(query);
let obj = {
Users: users,
total: count,
limit: limit,
page: page + 1
}