I can see where you want to go with this, but there are some limitations in the plugin mechanism that get in the way.
The plugin can return these objects, if the plugin has the objects are passed in. It cannot modify them or create new ones, but it can however arrange them in a list.
When you setup the API connector, you can choose it to parse the JSON, for which it creates its own types and are kind of inflexible but can be used by Bubble’s expressions.
The results from the APIs in the plugin are not sent to anywhere else in the plugin, that would need to be done by the app developer.
Some options here:
The app developer passes the data field by field into workflow steps like Create a thing.
The plugin returns JSON text and its stored as text, with all the associated problems like not being searchable etc.
I suggest that the implementation you are thinking of is impractical, so try looking at the problem a different way and come up with a different solution.
tbh, i find bubble quite useless with these limitations
i can literally not use any API i want, the data is unusable and just a list of things unless i can make an API call for exactly what i need, which isn’t possible either because i can not call any arrays
i really have no clue why i should keep using bubble
I’m trying this concept of turning the response from an API call into text. I’m running into the issue of not actually being able convert the text back into a JS object for use in an expression. Is there some special way we’re supposed to reconstitute a geojson text blob for use in an expression? I’ve used JSON.parse(MyDynamicBubbleVariable) and sadly that hasn’t worked.
It’s weird though because when I console.log(MyDynamicBubbleVariable) I can see the array as normal in the Firefox console but it throws an error when I actually try to use it in my function… making it seem like it’s perfectly fine but not at the same time.
Here’s the error log in chrome for when the console.log(MyDynamicBubbleVariable) line works but when updateIsochroneLayers(JSON.parse(MyDynamicBubbleVariable)) doesn’t. Says something about the character o
But here’s what the json actually looks like and I don’t see any o's at position 1:
Hmmm, when I call updateIsochroneLayers(JSON.parse(JSON.stringify(MyDynamicBubbleVariable)))
that no longer fails but now it fails in the actual function (which under regular circumstances always works).
Showing me that feature is undefined
So bizzare… I’ve confirmed the object is now successfully passed into updateIsochroneLayers but something seems to go wrong perhaps starting at the for loop.