API Connector - <> dynamic values

Hi

I’ve managed to successfully connect to a geocode API with the standard JSON body. However, I’m struggling how to use the dynamic values to make them available in Bubble.

THIS WORKS

AND THIS IS THE RESULT

HOWEVER, I JUST CANT GET INTO MY HEAD HOW TO USE THE DYNAMIC VALUES.
(1) I need two different '“lon” and “lat” but Bubble only seems to recognise one set, and I imagine my API provider will only recognise “lon” and “lat” so its not as if I can create some different keys;
(2) when I add the <> to make ‘Key’ elements, I’m not sure what to do with the numbers in the JSON body?

Any help would be greatly appreciated :slight_smile:

Thanks

Stephen

You’re doing it wrong… (aside from the fact you’ve missed a quotation mark before the sources lat key)…

In any case, it’s the values you want to make dynamic, not the keys…

So the <> need to go where the values go, not where the key names go…

Then you can name the dynamic value keys anything you want (you can’t have 2 with the same name)…

e.g.

“lat”:<sources_lat>,

Then you can define the sources_lat parameter in your workflows or data sources (and when you initialise the call).

Hi Adam.

Many, many thanks, it worked. It’s so obvious when you point it out. God knows how long I would have been stuck on that.

1 Like