nodeGame / NDDB

Javascript lightweight N-dimensional database
http://nodegame.org
MIT License
16 stars 4 forks source link

Retrieve the JSON data #15

Open risharde opened 2 years ago

risharde commented 2 years ago

@shakty Is there a way to retrieve the JSON data from the NDDB.db() object? This is not a deal breaker but I'm assuming this data is stored in memory when the NDDB object is created and I'd prefer to access it from memory versus reading the source json file. Again this is not a deal breaker but a nice to have for efficiency in my case. Please let me know if that is possible.

Thanks for your help so far!! Really appreciate it!

shakty commented 2 years ago

Hi,

You can fetch the items:

https://github.com/nodeGame/NDDB#fetching-items

If you want direct access to the array, it is simply db.db;

Am Mo., 2. Mai 2022 um 04:29 Uhr schrieb risharde @.***

:

@shakty https://github.com/shakty Is there a way to retrieve the JSON data from the NDDB.db() object? This is not a deal breaker but I'm assuming this data is stored in memory when the NDDB object is created and I'd prefer to access it from memory versus reading the source json file. Again this is not a deal breaker but a nice to have for efficiency in my case. Please let me know if that is possible.

Thanks for your help so far!! Really appreciate it!

— Reply to this email directly, view it on GitHub https://github.com/nodeGame/NDDB/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHJM5AEENQUA4ESH4M4WE3VH44X7ANCNFSM5U2Y7CLA . You are receiving this because you were mentioned.Message ID: @.***>