Assuming that your collection is defined and initialized, and that you want to change the collection (change it in place), you need to do:
collection.reset(collection.first(n));
you can use .last(n) to get the last N elements.
If you just wanted to get the first n elements without modifying the collection, just do:
var models = collection.first(n);
Here is a list of all underline methods that you can use directly in your collection.
Tom tu
source share