I've got a multidimensional array, like so:
let = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
I need to find the index of array in which element "6" is, which in this case is index 1 as it is in second array.
Any idea how to find it? So far I've got
let theIndex = groupedButtons.map(group => {
group.findIndex(group.forEach(e => {
e === 6
} ))
})