Check out example codes for "filter through array of arrays ruby". It will help you in understanding the concepts better.
Code Example 1
array = [1, 2, 3, 4, 5, 6]
array.select { |number| number > 3 } # => [4, 5, 6]
Learn ReactJs, React Native from akashmittal.com