0
にオブジェクトのプロパティを1つ取得し、私は次のオブジェクトは角 - 配列
export class HourPerMonth {
constructor(
public year_month: string,
public hours: string,
public amount: string
) { };
}
を持っている今、私は、オブジェクトからわずか数時間で配列を埋めるためにしたいです。
private hourPerMonth: HourPerMonth[];
private hoursArray: Array<any>;
getChartData() {
this.chartService.getHoursPerMonth().subscribe(source => {
this.hourPerMonth = source;
this.hoursArray = ?
});
}
時間オブジェクトをhoursArrayに取得するにはどうすればよいですか?