relatively new to backbone. I'm trying to filter and sort a collection before passing off to the template. I can easily sort OR filter, but I can't figure out how to do both. I tried chaining them, creating a variable to hold the filter then sort on that, but can't get anything to work. Any advice?? Thanks!
# Can filter like this:
monday = @collection.where({ target: '#day-mon' })
# Can sort like this:
mondaySorted = @collection.sortBy (t) -> t.get('order')
# Doesn't work:
mondayFilteredSorted = @collection.where({ target: '#day-mon' }).sortBy (t) -> t.get('order')
# Doesn't work:
mondaySorted = monday.sortBy (t) -> t.get('order')