I want to get the title of each model and after that split the title into artist + title.
The data is JSON delivered by https://gdata.youtube.com/feeds/api/users/beta/uploads?alt=jsonc&v=2&max-results=48&orderby=published
My collection looks like this:
videoCollection = Backbone.Collection.extend({
url: function() {
return 'https://gdata.youtube.com/feeds/api/users/beta/uploads?alt=jsonc&v=2&max-results=48&orderby=published';
},
parse: function(res) {
return res.data.items;
}
}
First of all I tried:
var title = this.collection.each(function(item){
item.get('title');
});
but that didnt work very well, so how can I get the title and split it up?