How to auto export JSON file after running SQL command?

@Kangland

While there is no direct function to export from query to JSON within DB Browser for SQLite – you can have the query create a table, export the table to JSON, then drop the table so it doesn’t persist.

There’s an example in my previous response: Save query results as csv for CSV. All you should have to adjust is to use Export → Table(s) as JSON