I want to select elements with its indexes based on given condition for n dimension array
I have solution for two dimension array like below
ary = [ [