我希望获得每个模型的标题,之后将标题分为艺术家+标题。
提供的JSON我的收藏如下:
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;
}
}
首先我试过了:
var title = this.collection.each(function(item){
item.get('title');
});
但是效果并不好,所以如何获得标题并将其拆分?