I really like Backbone, but I am having the hardest time doing what would seem to be simple things. I appreciate any help with the following example.
I have a model,
"defaults" can also be a function.
var Criteria = Backbone.Model.extend({ defaults: function () { return { "status": "Normal", "priority": "Normal", "tags": new Array() } } });
This would create a new array when a new Criteria is instantiated. See: http://backbonejs.org/#Model-defaults