Search This Blog

Friday, March 25, 2022

Iteration only the values by using the key

 loadPrimaryTrendLine()
  {
    this._dashboardService.getPrimaryTrendLine(res =>{
      let linecharts = res[0];  
      Object.keys(linecharts).forEach(key => {
        this.PrimaryTrendLine.push(linecharts[key]);
      });
     })
  }                          

Json : Api Hit (http://127.0.0.1:8000/app_dashboard/primary_trend_line)

[
    {
        "primary_01_value"0,
        "primary_02_value"1836.0,
        "primary_03_value"133785.096
    }
]





                                                             

No comments:

Post a Comment

Validating to select in sequencial order using angular

    < input type = "checkbox" (change) = "handleSelectTaskItem($event, taskItem)" [checked] = " taskItem . i...