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

251
Vistas
Search the whole database all the keys and the valuese with Moongose

So what I want to do is search all collections in my mongodb, for example, cars, users, cities, so all those collection to be searched all the keys and values so I can send to the front and manipulate, so collect all collections, search them all and return the founded field.

I found this one: (but it seems that searches only the country, I want to search all keys available that are string.

let models = [];
    models.push(mongoose.models.someCollection1);
    models.push(mongoose.models.someCollectionN);

    return Promise.all(
      models.map((model) => model.find({ country: 'd' }))
    );
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