Extracting Specific Data In API Response

Hi Bubble Community,

I’m currently working on a project where I am using an API call. In need to extract information from the response. The problem is I cant figure out how to extract it.

The response looks like this:

{
"body": {
    "created": 000000,
    "data": [
        {
            "url": "https://"
        },
        {
            "url": "https://"
        },
        {
            "url": "https://"
        }
    ]
},
"error": {
    "status_code": 200,
    "status_message": "OK"

I need to extract each individual url and put them into individual text boxes. My problem is, is that once you get past “first item”, you can only select “url” and no option to filter it.

This is what I tried:

  • Set State (text)
  • Value: Result of step 3 > Body > first item > url > ?

It’s here when I get stuck because you cant filter individually. Has anyone done something like this before?

Any help would be awesome.

Thanks,

Jasper

If you want them in individual text boxes then you’ll need to use a repeating group… just set datasource to the list in question (here, the list of URLs) and add the text box to the cell.

If you don’t need individual text boxes, and can display the full list in a single text box, the you can use :format as text on the list of URLs

1 Like

Hi Adam,

Thank you for the help. You were right, but I also had another issue that took me awhile to find. I made the mistake of copying and pasting a value. The value was using special formatting and throwing the API call off.

All fixed and working now though which is great.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.