BW API return data differently

I Need my BackEnd API to return data exactly how it’s recieving so I can use in my app:

This is the data it’s being received, every supplement as an individual object, perfect, beautiful, god’s work!

This is how it’s sending it back, completely unusable for me!

I’ve tried many many many times, i trully believe I am loosing my mind. Can anyone help me?

{
 "rec" [Request Data each items's:formatted as text]
}

Inside the formatted as text

{
"supplement":"This item supplement",
"daily_intake":"This item daily_intake",
...
}

Something along those lines.

My friend, I am a little dumb, can you explain better?

No worries.

Basically you want to create a list of JSON object instead of creating a list inside each variable.

So you can try to replace the expression in your third screenshot by

{
 "rec" [Request Data each items's:formatted as text]
}

The :formatted as text operator allows you to build that JSON object for each item return by the request data.

See documentation : Operators and comparisons | Bubble Docs

So clicking the :formatted as text operator, bubble will ask you for the Content to show per list item and a delimiter.

In the content to show per list item you can add your JSON object.

{
"supplement":"This item supplement",
"daily_intake":"This item daily_intake",
...
}

In the delimiter a comma.

Just so I see if I understand, is this the suggestion?

THANK YOU!!!

1 Like