so I have this object
const data = [
{"draw_date":"2022-03-16T00:00:00.000","winning_numbers":"34 42 48 51 56 59","bonus":"6"}
]
and I want to create a data structure that I can group the winning numbers
"winning_numbers":"34 42 48 51 56 59"
with the day
"draw_date":"2022-03-16T00:00:00.000"
So I would have an object with keys that will group the winning numbers like 0 will group numbers from 0-9, 1 => 10-19, 2 => 20-29, … , 5 => 50-59
{0,1,2,3,4,5}
and each key will have an array of the winning_numbers with its date, there is only 1 row object in the example but I want to use like 1,000 rows
const newObject = {
...
3: [ day: {
'2022-22-03': [32,32],
...
'2022-25-12': [30,33, 39]
}]
...
}