I have the following:

array = ["John", "Mike", "Bob", "Mike", "Bob"]

i want to get output:

[["Mike", "Mike"], ["Bob", "Bob"], ["John"]]
Edit
Report