Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
how can i get all orderlist by group of created date with node sequlize orm?

I want to make an API to get group object of array by created date(like 10 order placed today,5 order yesterday). can anyone can help me how can I do that??

async getdailyList(req, res, next) {
       
        try {
            await db.Order.findAll({
                order: [['createdAt', 'DESC']],
                include: [{ model: db.customerModel }, { model: db.orderCart, include: [{ 
                model: db.varientModel }] }],
            }).then(list => {
               

                res.status(200).json({ 'success': true, order: list });
            })
                .catch(function (err) {
                    next(err)
                });
        }
        catch (err) {
            res.status(500).json({ 'errors': "" + err });
        }
    },
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda