trying to go through a dictionary and get values and get each of the array values in it to manipluate them but get this error, at first I thought it might be because I forgot the semi-colon at the line that defines the dict but the error stays.
getPieChartSeries(logsList){
let devidedLogs = this.divideLogsByExitCode(logsList);
console.log(devidedLogs);
let pieChartSeries = [];
Object.values(devidedLogs).array.forEach(element => {
pieChartSeries.push(this.getPrecentageOfLogType(element,logsList))
});
console.log(pieChartSeries)
}
getPrecentageOfLogType(logsList,logsOfTypeList){
let numOflogs = logsList.length
let numOflogsOfType = logsOfTypeList.length
let precentageOfLogType = Math.round((numOflogsOfType / numOflogs ) * 100)
return precentageOfLogType
}
getCurrentTime(){
var d = new Date();
return d.toLocaleString()
}
devidedLogs is
{failedFaults: Array(0), failedProbesLogs: Array(1), failedRollbackLogs: Array(0), rollbackedLogs: Array(0), selfHealedLogs: Array(3)}failedFaults: []failedProbesLogs: [{…}]failedRollbackLogs: []rollbackedLogs: []selfHealedLogs: (3) [{…}, {…}, {…}]__proto__: Object
devidedLogsdata?arrayproperty inside yourdevidedLogsobject