I have an array of objects of this type
Obj = { timeEnd:"06:45 AM",
timeStart:"04:23 AM"
}
The array is of the type [obj1, obj2, ....] of that day.
This array determines how much time is spent on actions.
I want to recreate or transform this array into a temporary wise array like
obj = { '4-5 AM' : 37,
'5-6 AM' : 60,
'6-7 AM' : 45
}
I tried to search could not. I am noob.
Please let me know if you need any other information. The ultimate goal is to create an hourly chart chart.js
source
share