You are passing array of javascript objects. But the set
is only available in Backbone.Model
instance. Only after initialisation, every single object converted into Backbone.Model
Object.
You have to do like
var rank = 1;
_.each(cats, function(cat){
cat.rank = rank;
rank++;
})