Mates I'm trying to get the greater attribute from a backbone collection amongst all its contained models.
As an example:
App.Models.Example = Backbone.Model.extend({
defaults: {
total: 0,
created_at: '0000-00-00',
updated_at: '0000-00-00'
}
});
App.Collections.Examples = Backbone.Collection.extend({
model: App.Models.Example,
url: 'examples'
});
var examples = new App.Collections.Examples();
examples.sync();
What I need to get, is the greater created_at field.
How could I do that?
Thanks!