Iterate over the first n elements of an array February 20, 2023 by Tarik You can get first n elements by using arr = objects.first(n) http://ruby-doc.org/core-2.0.0/Array.html#method-i-first