I\'m trying to figure out the most optimal and with as minimum amount of loops way to group my array of js dates objects from this: (Take a note this is browser console outp
Why do need this optimization? If your array is not large enoguh than you probably don't need to optimize your algorithm.
I am not familiar with the given js libraries, but you can group your array by days with one loop. But you need to somehow determine the current day in the array and then create corresponding js object with a day-field and a times-array field and then add this object to your resulting array. It will be much faster if you presort your array before implementing this algorithm.