How to convert repl database to json?
h
yoursoulsaver

Hi there, im fiddling around with the repl database and in my code i wanted to get a database value and convert it to a json file for my code to read. After many failed attempts i have almost given up. How should i go about doing this?

You are viewing a single comment. View All
Answered by OldWizard209 [earned 5 cycles]
View Answer
OldWizard209

are you using python? if so, i would recommend use the json module, read the contents of the file, and upload the content to the database. Although, you will need to assign the entire content to a key, it will work just fine.

If you are using JS, the simplest way is to pass in script tags of your json file and your js script in a html file, and in the js file use this code:
HTML:

JS:

Hope i helped
@yoursoulsaver