Skip to content
Advertisement

Group array rows by column value and create subarrays in each group

I have an array like the following:

JavaScript

I would like it to be in the following format:

JavaScript

so that each sub-array contains elements of the same date.

Advertisement

Answer

You can do this way.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement