Reputation: 3592
i`ve an object collection. The problem is that add the object collection to another collection in Backbone.Push and add methods of Bacbone.Collection don't work.here is my collection which is need to be added to another collection
Upvotes: 6
Views: 4166
Reputation: 5767
Assuming they are backbone collections (which they don't look like in your console window)
try: collectionA.add(collectionB.models)
If you are trying to add an object array to a collection try this:
_.each(kids.result, function(kid){ collectionA.add(new Backbone.Model(kid)); });
Upvotes: 11