我正在尝试使一组对象文字与服务器数据保持同步。这些对象通过backbone.googlemaps 扩展被放置在谷歌地图上。
我有一个收藏:
var LocationList = Backbone.Collection.extend({ model: Location, url: '/locations' })
如何从该LocationList
集合中获取一组对象文字?我的目标是这样的:
[{name: "Home", address: "123 Pleasant St"}, {name: "Work", address: "123 Unpleasant St"}]