My data structure is an array that looks like this:
const myArray: number[][] = [[1,2,3],[4,5,6]]
I am trying to find the index of a specific element within this multidimensional array. Typically with a 1D array, I would use [1,2,3].indexOf(1)
which would return 0
. However, this method does not work for my situation.