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

154
Views
Strap model object property is empty, but debugging the entire object shows many properties

So I have a strapi cron job, and this is part of it:

const entity = await strapi
  .query("registration")
  .model.query((qb) => {
    qb.where("created_at", ">", emailSendDate);
  })
  .fetch();

strapi.log.debug("entity", entity);
strapi.log.debug("entity type", typeof entity);
strapi.log.debug("entity email", entity["email"]);
strapi.log.debug("entity email", entity.email);

And then I get this response:

[2021-10-05T03:49:01.012Z] debug entity {"id":98,"email":"example_email@domain.com" ...
[2021-10-05T03:49:01.012Z] debug entity type object
[2021-10-05T03:49:01.012Z] debug entity email undefined
[2021-10-05T03:49:01.012Z] debug entity email undefined

Maybe I am not understanding something here, but shouldn't this be a plain Javascript object? Why am I getting undefined when trying to access the properties?

about 4 years ago · Juan Pablo Isaza
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!