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

147
Views
cómo verificar si el objeto de fecha actual se encuentra entre una fecha de inicio y una fecha de finalización dentro de un objeto anidado en mangosta

Tengo un objeto anidado como este votingPeriod: {startDate: ISOdate(), endDate: ISOdate()} . Estoy usando la siguiente consulta, pero aún recibo un objeto vacío de mongo. const organizations = await this.organizationRepository.find({ votingPeriod: { "endDate": { $gte: new Date()}}}); Incluso lo probé con .toISOString() pero no está ayudando.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Finalmente encontré la respuesta a mi propia pregunta y funcionó bien. Cambié mi consulta de esto:

const organizations = await this.organizationRepository.find({ votingPeriod: { "endDate": { $gte: new Date()}}});

a esto:

const organizations = await this.organizationRepository.find({ 'votingPeriod.endDate': { $gte: new Date()}});

about 4 years ago · Santiago Gelvez Report
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!