REST API - Can't load into table, CSV style?

One of my SaaS platforms at work has provided me with an API to access some information. When I do a GET request this is what it spits back out at me. The platform typically outputs reports in HTML or CSV format and this API also looks like some form of CSV.

{
  "message": "\"Delivery Date\",\"Customer Account #\",\"Customer Name\",\"Route ID\",\"Vehicle Key\",\"Driver Username\",\"Driver Name\",\"Address\",\"Zip/Postal Code\",\"City\",\"Country\",\"Arrival Time\" etc....

When I try to load that into a table in Retool I get:

Invalid value. Try passing in an array of objects, or the result of a SQL Query with something like {{ query1.data }}

Hey @rcanpolat!

Retool comes with the PapaParse library built in which I think could be useful here since, like you said, it looks like it's a CSV.

Can you try adding something like the following as a transformer on your query?

return Papa.parse(data.message, {header: true}).data;

Yes that seems to tidy up the data. I'll play with it and see what I can do, thank you @Kabirdas