Bu yerda Node.js-da eng ko'p sotilgan 10 ta mahsulotni ro'yxatga olish uchun qanday usulni amalga oshirish mumkinligi haqida misol keltirilgan: const Products = require("../models/Products"); const getTopTenProducts = async () => { const topTen = await Products.find({}).sort({ quantitySold: -1 }).limit(10); const results = topTen.map(product => ({ name: product.name, sku: product.sku, quantitySold: product.quantitySold })); return results; };
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence