I have a jsonb field in a database table that holds the following data:
{“access”: {“D2024.06.13”: [{“qty”: 1, “time”: “12:05”}, {“qty”: 3, “time”: “12:32”}], “D2024.06.14”: [{“qty”: 1, “time”: “08:37”}]}}
I would like to group the data by date and by time in 10 min slots (00:00 to 23:50)
so
2024.06.13
12:00 : 1
12:10 : 0
12:20 : 0
12:30 : 3
12:40 : 0
...
{'2024.06.13' : {'12:00':1, '12:10':0, '12:20':0, '12:30':3, '12:40':0 ....}, '2024.06.13' : {'12:00':1 ....}
so I can draw a timeline afterwards.