wondering how to set up a JSON database and how to read it in JS
First off, great question!
I believe you are talking about NodeJS, just given some of your repls in your profile, so I'm going to show a solution that I use (and love) in NodeJS.
A great JSON database is
NeDB which makes it a piece of cake to work with JSON data. It is almost a duplicate of
MongoDB which means that it is a NoSQL database. You can save, load, query, etc. all kinds of data. Here's a simple example of storing some JSON data into the database and then retrieving it: https://repl.it/@heyitsmarcus/NeDB-Test
I really hope this helps!
If this helped solve your problem, please consider upvoting and marking my answer as the accepted answer to close this question. I'll continue to answer any questions you might have, though.