I need some help trying to figure out a way to convert a JSON url that is saved in my bubble database to a usable list of bubble data on the backend workflow. Any ideas? Maybe some JavaScript code?
@vini_brito@copilot@vincent56 any ideas? I know you guys work with JSON code better than me. I still donβt know how to code yet.
Iβm assuming the url is https://example.com/myfile.json
Yeah, you can for example, in a server side action (but first test it in your local node environment), fetch() that URL, the response will be the JSON content, just look into the Understanding context.async thread and youβll know how to use fetch.
Then JSON.parse that into an object, then process that object to extract the values you want into an array, return to Bubble that array (or as many arrays you want) as a list (or as many lists you want) of texts (or number, or dates, whatever it is).
@vini_brito Thanks for the response, I looked at the post but unfortunately itβs still over my head at the moment.
@Jici, how would I set it up from the API Connector as Data? Where do I put the dynamic URL that I will be passing from the backend workflow? I am such a visual person, would you mind sharing a screenshot?
Will the json will always have the same structure?
Do you really need to pass it in a backend WF to use it?
I would like to understand a little bit your use case from start (where the json come from, how itβs generated and how do you want to use it).