Iterate over the task array as you have done and then map the corresponding fields you need from it to form the TaskWithDate array as illustrated below:

ticketsWithDate: TaskWithDate[];

this.ticketsWithDate =
  tsk => {
    return {
      task: tsk,                       // map entire task object
      fullDate: {                      // fetch begin and end dates from task to 
        beginDate: tsk.beginDate,      // form a new key i.e fullDate
        endDate: tsk.endDate

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top