Tried web resources and didnt have any luck and my visual quick start guide.
If I have my 2d/multidimensional array:
array = [[\'x\', \'x\',\' x\',\'x\'
This will do it:
array = [['x', 'x',' x','x'], ['x', 'S',' ','x'], ['x', 'x',' x','x']] p array.index(array.detect{|aa| aa.include?('S')}) # prints 1
If you also want 'S's index in the sub array you could:
row = array.detect{|aa| aa.include?('S')} p [row.index('S'), array.index(row)] # prints [1,1]