What would you do for the following function

An app I am building is relying on a 3rd party API service. Unfortunately that service return a text and within it a json object or array (a very weird way I know)

While 1 (“json object”)

So, as from bubble I cannot remove the while part and transform this into a json, I am sending the input to n8n an api, transform it with a JavaScript function and then send it back to bubble so I can get it as json. And that worked fine but I have a page where this needs to happen 100 or more times and it kills my server. Is there any way you can think of on how this could be achieved in bubble ?

Hey @simosmik, are the responses consistent and with one JSON output? If so you could try this regex {[\s\S]*} with a ‘extract with Regex’ operator on the string that’s returned.

I think that would work, if you know of an effective way to get the info from the key-value pairs on the front-end when its returned let me know!

Cheers.

For future reference, I ended up creating a plugin instead to remove the irrelevant things and return a bubble object instead