I am running a raw query sql query
const result = await database.raw("select * from sometable")
I need to return the result back to my vuejs client as CSV data.
I have been trying to use the json2csv library https://www.npmjs.com/package/json2csv but it seems to be struggling with the serialized result created by database.raw()
How do I turn that database.raw() serialized result to a plain old JSON array of simple objects?