Converting a json object to text

I am calling an API that returns a list of json objects. I want to take that json and post it to another API. I feel like I must be missing something super obvious, because bubble just complains that i’ve got a list and not text no matter what I do to it.

Bubble (rightly) pulls the json back from the API to create a list of objects, but in this case I don’t want the objects, i want to use the json as text (I do use the objects to display data in other places, so it’s useful, just not all that i need).

Is there any way to get it back to plain json so I can just post it to my listener? I’ve read a lot of people wanting to go the other way, from text to json, but haven’t been able to find a solution to get the json object back to text. I can think of some other ways to accomplish my end goal, but since i’ve already got the data in front of me i’d prefer to use it if i can.

Thanks in advance for any ideas!

Probably this new plugin will allow you to accomplish the task:

1 Like

Thanks @JohnMark! It sounds like it probably will. I was hoping that there was something easy i was missing since I already have the json - so I’ll check out the plugin and see if it’s more responsive to use the plugin to rebuild the json or just to do another call to get the json from the database without parsing it in the first place. Thanks again for the response!

1 Like

Just for anyone else who might find this in the forum later - i was missing something easy, which was that i just needed to make sure that the api call that returned my json that I want to turn around and send somewhere else was set as text and not as json. I thought it was enough to set it as text in the returned field, but not so - setting the call to text was all that I needed to be able to accomplish what I wanted.


I have the same requirement. I want to store the JSON in global variable plugin. For that i have to convert JSON into the text format. In this way i will be able to access the global variable from eveywhere in the app. While retriving i need to again convert that global variable text value into the JSON.

Did you find any solution for JSON to text conversion?

This just got too much for me so I put together a nasty hack using combinations of Arbitrary Text to manually concatenate the string I wanted.

And a screenshot of the API Connector function calling OpenAI.