Easy way to CSV to JSON?

I’m looking for a simple solution to convert an uploaded CSV file into JSON, the JSON data needs to be stored in a database as text.

Is there any way to do this? I’ve tried a number of plugins already but I’ve just ended up banging my head against my desk as I can’t find a solution.

@alastairewilkinson is your use case a consistent format of a CSV (table headers the same)? If so, you can use the 1T CSV uploader plugin (this quickly converts to JSON).

1 Like

The headers will be user-defined so not consistent no. The CSVs will be simple datasets consisting of only headers and content below.

I’ve been trying to implement CSV File to JSON plugin but have had error codes when sending to the backend API workflow.

What are you planning to do with the data after it goes to backend workflow?

There’ll need to be some consistency if you’re planning to run actions after this (creating things etc.)

Or are you looking to just save the JSON as a text field like ‘{“value”:“key”,“value”:“key”,“value”:46}’?

Not sure what your use case is but I used the 1T CSV plugin followed by the JSON Operation Plugin | Bubble

I used them to uploaded a CSV file with unique IDs and update rows in a table.

I need to allow the user to upload a CSV file with headers and content and convert that CSV into a JSONL format. E.g.

Column Headers: Author, Content, Date

Format Needed:
{“Author”: “something”, “Content”: “something”, “Date:”: “something”}
{“Author”: “something”, “Content”: “something”, “Date:”: “something”}
{“Author”: “something”, “Content”: “something”, “Date:”: “something”}

After some more playing around with CSV File to JSON I’ve managed to get the CSV file passed through but at the moment it’s being stored in the backend as text data formatted (using the above example) like:

Author, Content, Date, something, something, something, etc

Thanks for sharing - I’ll explore this avenue and let you know whether it works for me.

Using the 1T CSV plugin you can save the output as JSON, and then save this as text (raw JSON).

If you’re planning to use this data in some way with Bubble, you can send this JSON to a backend workflow to extract the data.

Appreciate your help, unfortunately, I’ve not been able to find a way to integrate this.

The 1T CSV plugins requires mapping to column headers which I cannot do as each column header may be unique - I have already manage to determine a way to extract the data as raw text and send to the backend.

As previously stated, the data is currently being stored like this:

Author, Content, Date, something1, something2, something3, etc

Do you have any suggestions on the best way to manipulate this data into the following format, ideally, all within Bubble.

{“Author”: “something1”, “Content”: “something2”, “Date:”: “something3”}

This topic was automatically closed after 70 days. New replies are no longer allowed.