0
如何獲得JSON收藏我使用的書架,我想要做這樣的事情:使用書架
function myfunc() {
this.vals = Accounts.forge().fetch();
}
我能得到的集合對象,但我不能叫.toJSON它來存儲在這裏。我錯過了什麼?我可以在。後來()承諾訪問集合:
.then(function(collection) {
console.log(collection.toJSON());
})
我怎麼能存儲此JSON在this.vals?