var storage = require('node-persist');
storage.initSync();
storage.setItemSync('accounts', [{
bankname: 'Chase',
balance: 0}, {
bankname: 'Bofa',
balance: 0}
]);
var accounts = storage.getItemSync('accounts');
console.log('accounts are ' + accounts);
输出: 账户是[object Object],[object Object]
我如何获得实际的储值?
使用 node@5.4.1,node-persist@0.0.6