.toJSON()

Parses and returns all data from the database as an object.

toJSON()

db.toJSON(); // {}

db.set('colors', ['red', 'green', 'blue']);

db.toJSON(); // { colors: ['red', 'green', 'blue'] }

Last updated