Strange formatting of API structure in the API call

Hi all!

I am connecting to a certain proprietary API and having trouble with the way bubble parses results of one of the calls during initialization:

The call that works properly:


So naturally bubble creates the fields id, name, etc.

However in a similar call below


it creates a single field for each date’s total, allocation, etc. Most annoying and I don’t have a single clue how to fix this.

Any ideas?

Bubble is parsing it correctly - if you look into the raw data - the dates are written as keys of the json object. So - it is more like a bad formatted API return than a bubble error.

In this case, I would use the API as raw text and create a javascript custom code to parse it. Does that makes sense?

The API is returning what we call a dictionnaries of data. Bubble cannot handle this directly. @rafael.tgt have one solution. Other are to use JSON plugins, regex or this plugin JSON Dictionaries Conversion Tool Plugin | Bubble that will convert the dictionnaries to something that Bubble can handle.

1 Like

Oh, I will certainly have a look at the plugin, thanks!

The reason I’m using bubble is cuz I rather suck in coding, so this might be the best way to go.

@rafael.tgt As this API is used by a ton of ppl and hasn’t been updated since 2019, I doubt they will change the structure :wink:

Thank you both, I will try it this weekend.

1 Like