Is there a way to dynamically access a nested array using indices which are themselves stored in an array?
The main array/matrix nesting could be variable e.g. 2, 4, 100.
Example:
my_array = [
[[1, 2], [3, 4]],
[[5, 6], [7, 8]],
[[9, 10], [11, 12]]
]
my_array.access_using_array([0, 1, 1])
=> 4