I have the array ["oop", "poo", "oop", "kkd", "ddd", "kkd"].
Is there any elegant way I can split it to sub-arrays, so each array contains elements with same values?
I want to achieve the following
var arrayOne = ["oop", "oop"]
var arrayTwo = ["poo"]
var arrayThree = ["kkd", "kkd"]
var arrayFour = ["ddd"]