I have a 2d array (which will always have a random number of rows) as follows:
arr = [['tag4', 'example', 'project1'],
['tag1', 'example', 'project2'],
['tag3', 'example', 'project2'],
['tag2', 'example', 'project3']];
Taking note that this array will always be sorted by the values in the 3rd column and the # of rows in this array will not be consistent(random)... how can I group each different tags of a project in a unique array?
Example desired outcome:
arr1 = [['tag4', 'example', 'project1']];
arr2 = [['tag1', 'example', 'project2'],
['tag3', 'example', 'project2']];
arr3 = [['tag2', 'exmaple', 'project3']];
Also, how could I keep track of all the unique arrays created? I need to know because I need to implement these arrays in another function.