I am trying to loop through the array of items and pushing to another array, I have got items list an index "0" but still able to get the error as mentioned in question. Please find the below code
createReportFormulaInfo(): Array<ReportFormulaEntity> {
debugger;
for (let sta in this.selectedSources) {
debugger;
let ido = this.selectedSource[sta].id;
this.selectedFormulaList.push({
Market_OV: this.selectedSources[sta].Market,
Set_Name: this.selectedSources[sta].Value,
Data_ID: Number(this.selectedSources[sta].Market),
Set_number: 0,
Formula_Set1: "",
Formula_Set2: "",
Formula_type: "",
Date_From: "",
Date_To: "",
UpdateFlag: "A",
Is_Current: 0
});
}
}
I am not sure how can i overcome this issue and I am using angular 4. Could anyone please help on this query. many thanks in advance.