[Solved] Strap model object property is empty, but debugging the entire object shows many properties

Steven Matthews Asks: 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:

Code:
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:

Code:
[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?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.