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

76
Views
Store array of elements inside map function

I want to store my dates that i generated inside my map function, now it stores as array inside my endDate, i tried using forEach but it returns undefiened

here is my stackblitz

console.log(this.final); // ["2033-05-19T20:00:00.000Z", "2025-11-04T11:26:28.316Z"]

this.personalInfo = {
  personalInfoId: 0,
  underageChildInfo: this.data.underageChildInfo?.map((i) => ({
    firstName: i.name,
    endDate: this.final
  }))
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This might be your solution then. Although here I'm assuming that your this.final has atleast this.data.underageChildInfo?.length values.

this.personalInfo = {
   personalInfoId: 0,
   underageChildInfo: this.data.underageChildInfo?.map((value,index) => ({
      firstName: value.name,
      endDate: this.final[index],
   })),
};
about 4 years ago · Juan Pablo Isaza 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!