Argument with array

hi,

 var return_y_in_grid = (arr, n) => {
        let _y;
        arr.forEach((activity) => {
            activity.forEach((s) => {
                if (s.num === n) {
                    _y = s.y
                }
            });
        });
        return _y
    }

it works with this : return_y_in_grid(e) // e is a 2d array
and don’t works with this array in a table return_y_in_grid(arr.e) //arr.e is also a 2d array

How do i write this for working with ‘arr.e’ ?