Try the partition method
@arr1, @arr2 = @level1.partition { |x| x[0] > 2.1 }
The condition there may need to be adjusted, since that wasn’t very well specified in the question, but that should provide a good starting point.
Try the partition method
@arr1, @arr2 = @level1.partition { |x| x[0] > 2.1 }
The condition there may need to be adjusted, since that wasn’t very well specified in the question, but that should provide a good starting point.