i modified the response from nestjs while creating the api closed

This isn’t specific to NodeJS or NestJS, but is regular old JavaScript. As you have an array of values you can use the Array.prototype.map method to map to a new array

return origArray.map((val) => ({ ...val, date_actual: val.date_actual.value }))

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top