I’m new to Bubble, and try to connect to an API that return an array of objects directly like this:
[
{
"Code2": "GB",
"Code3": "GBR",
"RegionCode": "",
"Culture": "GB",
"Name": "United Kingdom",
"Vat": 25
},
{
"Code2": "NO",
"Code3": "NOR",
"RegionCode": "",
"Culture": "no",
"Name": "Norway"
}
]
The API call is named GET All Countries
but I do not get an option to say that this is a list of type Country
the editor automatically set it to data type GET All Countrie
as in single form, but it makes no sense.
How do I handle this. Could I format the response somehow and make it more like this from within Bubble:
{
response: [
{
"Code2": "GB",
"Code3": "GBR",
"RegionCode": "",
"Culture": "GB",
"Name": "United Kingdom",
"Vat": 25
},
{
"Code2": "NO",
"Code3": "NOR",
"RegionCode": "",
"Culture": "no",
"Name": "Norway"
}
]
}
Or how should I approach this response?
Comment 1
I can see that it is working. I do get the data, and can iterate on it. I suppose I just want the data type to be of type Country
and not GET All Countrie
. If there is any way to make this happen from within Bubble, I would be happy