Iām working on a project in which the Backend is decoupled from Bubble (they only use Bubble for the frontend), so there are many APIs.
Many of these APIs make modifications to the database, with a POST type API call, but since we do not know which parameter the user can modify, we are creating the entire JSON with customs states, which makes it inefficient.
Additionally, once we modify something, we have to refresh the page, since otherwise the information that is being displayed with a Get type API call would not be updated.
Anyway. Would this plugin help me make workflows more efficient, but above all to not have to constantly refresh the page and make it faster?
It appears this plugin is precisely what youāve been searching for.
You can input the āRaw Body Textā of the API into the JSONata element, which allows for easy modification of each segment. You can see how it works here
In this challenge, itās unnecessary to utilize Post/Get APIs for every modification since you can employ the updated JSON from the elementās state. Additionally, browser storage can be used to retain data and synchronize with the actual database less frequently.
Please inform us if you have additional questions or encounter any challenges while implementing the plugin.
I started today using the plugin, it works fine but gives me a error right now and I donāt know where to start looking:
The plugin JSON Assistant / element { } JSON Extractor threw the following error: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at Function.from ()
at array_from (https://*********.bubbleapps.io/package/run_debug_js/4305cc1d11bf4a2942c5985b56bcd374dccc5da9eed49240125401df31b0ff16/xfalse/x29/run_debug.js:115:133512) (please report this to the plugin author)
Could you please share an example of the output JSON of that CSV with single item?
It may need to add [ ] to make it an array just like when there are multiple items.
@NoCodeDataArtisan 5 Stars! Love the plugin so far. Been playing with it for a couple of hours and have put together the best shopping cart, without needing to touch the database until the user is ready to payā¦love it so far and Iāve only scratched the surface.
I donāt know if this is a bug or a function of JSON. When I have a Key Value Pair, where the value is of type number and it is zero, the JSON extractor shows the value as empty in the debugger, and if I extract that value, it comes into the database as empty.
Is it possible to have 0 in JSON? Or is this an issue of how Bubble is treating the JSON?
I would suppose a work around is to set the number to 0 for database save if the value from the extractor is empty, but Iād really like to have it as 0 instead of empty if possible.
Iām trying to setup the plugin, but Iāve been unsuccessful so far. Specifically, I used the Things to JSON action to create some JSON output. I then followed the steps in the YT video to setup Bubble-type data retrieval.
The debugger is throwing the following error for both JSON Extractor and JSONata: āJSON Extractor threw the following error: Error: Expected a string, but got an object (original data: [25,50]. (please report this to the plugin author).ā
This suggests that the Things to JSON action is generating JSON that the plugin itself canāt process? In particular, I have a field thatās a list of numbers, and Things to JSON is outputting the following in JSON: ādenomination_list_numberā:[25,50].
@NoCodeDataArtisan: I believe Iāve found and fixed the issue. Specifically, denomination_list_number was detected as type=text when I did the manual API setup. Once I changed to type=number and reinitialized, everything appears to be good. Sorry to bombard you with forum posts and DMs!
The issue might stem from the data type youāve designated in the API call.
When assigning a list of numbers as the value for a key in JSON, the correct format is:
"denomination_list_number":[25,50]
The error suggests that the data type for this field was set as text rather than a list of numbers. To ensure the JSON is detected correctly, itās best to use the exact output as the input for the āManually enter the API responseā option.
@NoCodeDataArtisan Yup, I just diagnosed the same. Once I updated the field assignment to type=number in the API call, everything was good. Thanks, and onwards!
Please donāt hesitate to contact us again if you encounter any challenges or issues. We are always here to assist you.
Your support means a great deal to us, and we would be thrilled if you could spare a moment to leave a review for the plugin and share your experience with others.