I have 2 columns say ID and Hours. ID is self-explanatory. Hours column consists of hours for which an entity is open on each weekday as mentioned below. Note certain entities might be open intermittently in a day as shown in id 2.
ID | Hours
---
1 | {"sunday":[["10:00","21:30"]],"saturday":[["10:00","21:30"]],
"tuesday":[["10:00","21:30"]],"friday":[["10:00","21:30"]],
"thursday":[["10:00","21:30"]],"wednesday":[["10:00","21:30"]],
"monday":[["10:00","21:30"]]}
---
2 | {"sunday":[["7:00","15:00"],["17:30","21:30"]],
"saturday":[["7:00","15:00"],["17:30","21:30"]],
"tuesday":[["7:00","15:00"],["17:30","21:30"]],
"friday":[["7:00","15:00"],["17:30","21:30"]],"thursday":[["7:00","15:00"],["17:30","21:30"]],
"wednesday":[["7:00","15:00"],["17:30","21:30"]],
"monday":[["7:00","15:00"],["17:30","21:30"]]}
What I am looking for: Split the hours into different columns. Also, time should be placed under respective day.
ID | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday
---
1 | ["10:00","21:30"] | ["10:00","21:30"] | ["10:00","21:30"] | ["10:00","21:30"] | ["10:00","21:30"] | ["10:00","21:30"] | ["10:00","21:30"]
---
2 | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"] | ["7:00","15:00"],["17:30","21:30"]
I hope this information helps. In case it's not clear please let me know and I will try to improvise my question.
Thanks for your help in advance.
Regards, Ankur