let array = [
["7", "s"],
["7", "s"],
["6", "d"],
["5", "f"],
["5", "f"],
["5", "f"],
["5", "f"],
["5", "f"]
]
I have an array of arrays. So, most of the items in the array are the same. The result I want should have only one of each of the arrays plus an extra item that states the number of times the array was repeated.
//The new third value in the array is the number of times it was repeated.
[
["7", "s", 2],
["6", "d", 1],
["5", "f", 5]
]