Hi everyone, I’m working on a currency converter app using the Exchangerate API. The response includes a conversion_rates field, which is a JSON object containing currency codes and their exchange values, like this:
My goal is to transform this key-value object into a dynamic list of options for a dropdown.
However, Bubble doesn’t treat this object as a list. It breaks it into individual fields like conversion_rates USD, conversion_rates EUR, etc., which means I can’t extract or load this into a dropdown dynamically.
I’m still learning to Bubble and don’t know advanced stuff yet, so any help or simple examples would be greatly appreciated!
If you’re willing to guide me a bit more, I would truly appreciate it. I’m still learning how to work with API in Bubble, so any help would mean a lot.
Then set up the json just like the one in the editor, your dropdown then works
afterwards, to convert the text to list, there might be a way, but the easiest method might be javascript
but storing it as json works just fine
ask if you dont get anything
I had the idea of storing the result in a custom state called “converted currency”, which is of type text. My plan is that when the user clicks the “Convert” button, it will trigger the API call, and then the result will be saved into that custom state.
And here is how I’m trying to put the value in the custom state (I don’t know if it’s the best way, but that’s what I thought)