I\'m trying to figure out how to make a Collection of collections with backbone.js. I\'m pretty new to backbone. I have something like the following situation:
You'd solve your problem by turning your Playlist from a collection into a model. If you think about it, a Playlist would probably have other attributes anyway (e.g. name) that wouldn't be settable on a collection.
Playlists would then be a collection of Playlist models (instead of collections), which should work without error.
var Track = Backbone.Model.extend({
//trackdata
});
var Playlist = Backbone.Model.extend({
model : Track
});
var Playlists = Backbone.Collection.extend({
url : "playlists",
model : Playlist
});