D
D
dim5on2018-04-20 12:16:13
JavaScript
dim5on, 2018-04-20 12:16:13

How to save SQLite query result to JSON file?

Good afternoon ! There is a database in db3 format, the task is to write a query to this database and save the result to a JSON file.
Is it possible to make such a request in JavaScript (if so, what would it look like)?
In what language will it be most quickly done?
Can such code only run on the client in a browser without server code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Little Vasya, 2018-04-20
@emilov

Well, I use python DJango and the REST_Framework library as the language on the server , and I have vue on the front.
This is how I take the data in json

getPosts(){
            axios.get('/api/posts')
                .then(res => {
                    this.posts = res.data
                })
                .catch(error => {
                    console.log(error)
                })
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question