Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!