How to sort a client-side-only (local) Meteor Collection

Viewed 3258

I have client side only (local) Meteor collection defined like that (coffeescript):

Products = new Meteor.Collection null

However when I try to find() providing sorting parameters Meteor tells me that sorting of local collections is not supported. This is understandable.

I would like to know what is the easiest/simplest way to get sorted results. Essentially I always use all the data in the Collection, so keeping it in sorted state would solve the problem.

1 Answers
Related