I'm trying to make a line chart using the chart.js library. I have an array that contains the ISO dates. I'm trying to check who makes ISO dates belong to the same hour and the same day. I would then use this information to create the line chart using the chart.js library.
For example, I have this array of ISO dates:
[
{ date: '2022-06-10T07:32:07.744Z' },
{ date: '2022-06-10T08:32:38.490Z' },
{ date: '2022-06-10T07:32:58.720Z' },
{ date: '2022-06-10T07:33:25.121Z' },
{ date: '2022-06-10T07:35:18.556Z' },
{ date: '2022-06-10T07:35:56.459Z' },
{ date: '2022-06-10T07:36:38.736Z' },
{ date: '2022-06-10T07:36:38.736Z' }
]
I want to know which ISO dates belong to the same hour and the same day from this array.
I'm trying to make a line chart something like this - https://i.stack.imgur.com/fQe29.jpg.