techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.73k stars 482 forks source link

loadJSON error #880

Closed LzMiguel closed 2 years ago

LzMiguel commented 3 years ago

I can't load my database.

var read = require('read-file-utf8'); var loki = require('lokijs'); var db = new loki('db.json'); var data = read(__dirname+'/db.json'); db.loadJSON(data); console.log(db);

image

My 63 is "db.loadJSON(data);"

StudentESE commented 3 years ago

what about the JSON-File ? (test it with a json-file you can show us) I had a similar error and it depend on stringify/parse direction.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.