Extracting text from OpenAI output - Newbie Here!

Hi Bubble community!

I’ve set up an API call to OpenAI and I’m able to correctly display the text output as it is. What I need help with is how to extract element from the text and format it so it looks better.

For context, I’m creating a meal planning app and would like to take the output from the first image below and format it like the second, in a repeating group


I’m pretty new, to bubble (and any kind of development in general) so any help would be greatly appreciated!