How can I group items inside of a loop using jQuery?
I have these items like these in each loop iteration:
['ab', 'sd']
['ab', 'dc']
['ab', 'ca']
['bc', 'ds']
['bc', 'ea']
And I need to have an output like this:
{'ab':[sd,dc,ca],'bc':[ds,ea]}
I tried to filter them, but I couldn't achieve this.