Forum Academy Marketplace Showcase Pricing Features

API JSON parsing/format into bubble database

That is awesome men, thanks for the help! But i think i already was so far, the only thing i need is a way to use the data, the display is not the problem. But to call a specific field and get the results would be my problem.
Say i search for a specific name, so that it will return all the other information in that field. Or a ID and it will give me the rest of the data associated with it.
Right now i only have 4 rows to work with that returns a bunch of data.
Would be awesome when there would be a way to incorporate the data into bubble, like it’s shown in the fields. One column, one field :slight_smile:

Thanks again! i will look into this issue when i get more knowledge about bubble, atm am looking at some other stuff but i will get to this as soon as i have a clue how to deal with this issue.

Yes this is a pain point of the API Connector’s parsed result. To save its lists into individual database rows is awkward and slow.

The usual method is to send the list to an API Workflow endpoint, using Run API Workflow on a list, and its workflow step creates an individual database record; each create takes nearly 1 second.

You can trick the page workflow into doing the same thing, but its still just as slow, and makes the page nearly unusable while the user waits.

So you say, when the database is created, the whole app is not usable?
I mean, i guess i would need to update the whole list and can’t just update one user. So that would be indeed a problem to fetch the new data.

Well, there was another bubbler who said i should switch to API. Right now am not on a paid plan so i will look around first and try what i can for now before i buy a sub.
It’s just such a shame that the bubble database is not compatible with API arrays, i don’t even want to talk about it, i need to rage then again :smiley:

I suggest revisit your requirements, and see if having the list spread across database rows is necessary.

Instead of search, you can use filter, which gives similar field-level constraints to search.

Have to agree - I’m scratching my head here that I’m not able to bring in an array of values through a POST to an in-app Bubble API endpoint…

My case is really simple and I have full control over how the JSON is formatted before it is sent over to Bubble… but whatever combination I use, Bubble only detects the first value of the array when it is on DETECT.

Have you had any more thoughts on working around this?

Same here @edwardbutcher - I’m getting the array’s ‘first item’ only. Someone light a candle for us.

1 Like

I think I’m out of the other side of this… the problem was my end.

Did not clock that the JS FormData object always sends key: value pairings as strings, no matter how much prep you do on the data before it is appended to the form. I.e. you would always need to adjust for numbers or lists / arrays at the other end. Which cannot be done easily in Bubble.

So, for me at least, it was as simple as reverting to a more straightforward XMLHttpRequest().send with just stringified JSON. Bubble is now correctly picking up data types and lists.

What do you use to Stringify your JSON?

My case is pretty weird - I’m sending data from a Google Chrome plugin that I’ve written into the Bubble app… So I am preparing and sending the data from a Javascript file that sits within the plugin’s files.

Therefore I just JSON.stringify(my_data) as part of the outbound XML call.

1 Like

Edward, if you could provide more details of how you did this in your API connector setup it would be wonderful!

I’m currently having the strange issue with the API connector not accepting any types of arrays while setting up an email template sender.