我試圖保持一個對象文字數組與服務器數據同步。這些對象通過backbone.googlemaps擴展名被放置在谷歌地圖上。Backbone.js - 如何從一個集合中獲取對象文字的數組?
我有一個集合:
var LocationList = Backbone.Collection.extend({ model: Location, url: '/locations' })
我怎麼能抓住對象文本從這個LocationList
集合數組?我的目標是這樣的:
[{name: "Home", address: "123 Pleasant St"}, {name: "Work", address: "123 Unpleasant St"}]
工作室例如 – user2846569 2014-11-02 15:10:12