更新时间:2023-12-02 20:59:58
Backbone集合支持underscorejs 找到方法,所以使用它应该有效。
找到
Backbone collections support the underscorejs find method, so using that should work.
find
things.find(function(model) { return model.get('name') === 'Lee'; });
如何根据ID之外的某些属性从集合中查找模型?