One of the biggest limiting factors for me in bubble has been the perceived inability to create custom JSON and then be able to use specific values as data.
For example, a feature I was working on required a repeating group to show data from 2 different tables (activities & comments). I needed specific data from each table because the UI components were different, so I couldnt just display a list of text. So I got stubborn and decided to see if I could create JSON on the fly, and then be able to reference the values for each property as needed.
Here is the full implementation guide:
TL;DR:
- Create a custom data type using a ‘fake‘ API call via API connector, setting your desired JSON structure.
- Create a backend workflow that returns the raw JSON to you of the new data type.
- Create your JSON as string in bubble
- Use the toolbox plugins Run JavaScript action to parse the string as JSON, and then send it to yourself on the frontend (to be received by the JavaScript to Bubble element).
Basically creating a custom ‘datatype’ that you normally see as an API response, which you use as your JSON template, and then creating your JSON via Arbitrary Text, but telling bubble its not text but your custom datatype.
Hope my rambling makes sense, and would love feedback!