In an array
a = [[1,"José"],[2,"Pedro"],[3,"Maria"],[4,"Lauro"],[2,"Pedro"],
[5,"Léo"],[1,"José"],[6,"Caio"]]
How to get a new array b that shows the positions of the indexes with the arrays that repeat (equals) ?, in this case array b would look like this:
b = [[0,6],[1,4]]
I made a clone of the array comparing each position, but it was somewhat time consuming and also has the original positions that are included in array b making it the same array with the positions that are equal, / p>