I have an array called open and within that I have arrays for each day indexing from 0 - 6. Within each day array I have times and a day set. Within some of the days the times will be the same and therefore want to group the values that are the same. e.g
open[] -> [0] -> {open: 12:00, close: 16:00, Monday}
[1] -> {open: 12:00, close: 16:00, tuesday}
How could i group these value so that I can have an array that has the time and all the days associated with it. OR The best way to display that these days have this time.
this open array can also contain times that arent the same e.g:
open[] -> [0] -> {open: 12:00, close: 16:00, monday}
[1] -> {open: 12:00, close: 16:00, tuesday}
[1] -> {open: 14:00, close: 16:00, sunday}
Any help is appreciated!