[šŸŒŸ New Features: Ultra-Deep Drill] JSON Assistant Plugin: Your Solution to Complex JSON & API Data in Bubble

@NoCodeDataArtisan Wellā€¦ I just pasted two items into the data source (vs. just one), and now Iā€™m getting a different error in the debugger:

The plugin JSON Assistant / element { } JSON Extractor threw the following error: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
at Function.from ()
at array_from

Basically, one item works fine, but any more than that is throwing this error. Any ideas? (I have a very basic repeating group setup with an image and one text element.)

1 Like

@NoCodeDataArtisan I think this is part of the issue ā†’ in my DB, ā€œdenomination_list_numberā€: can either be something like [25,50] or null, because itā€™s optional. If I manually change instances of null to empty brackets, those items render just fine. However, if I leave them as null, then I get this TypeError in the debugger. (As a reminder, Iā€™m using JSON that was generated by the Things to JSON action.)

Will I need to do manual JSON surgery every time to make this work? Or some kind of find/replace with regex? Or, is there a way for me to adjust either my Things to JSON , or API assignment config? Thanks for any advice.

1 Like

Could you include a step to change "denomination_list_number": null to "denomination_list_number": [] before transforming the JSON into a bubble type?

I probably could. However, both null and empty brackets are valid JSON syntax, no? I use null to indicate an explicit absence of value (since the field optional). White empty brackets indicate that the field is present, but has no elements.

Iā€™ve found at least one more instance of this null-shaped issue leading to TypeError errors. Sounds like find/replace is the recommendation (?), so Iā€™ll keep that in mind re: whether it makes sense to use the plugin going fwd. i.e., the cost and hassle of daisy-chaining data transforms vs. performance gains, etc.

1 Like

FYI: Looks like Things to JSON converted an empty "denomination_list_number" to the following JSON output elsewhere in the file: "denomination_list_number":{"_pointer":[],"single_api":false,"list_api":true}. Which is also triggering the TypeError. Will try and hunt for other gotchas later. Thanks.

1 Like

Indeed, both are valid JSON syntaxes. The challenge lies in converting JSON to a Bubble data type and ensuring Bubble accepts the converted JSON. It must match the sample JSON used in the API call.

Is this an action performed on the backend, or is the element being utilized on the frontend?

When ā€œdenomination_list_numberā€ exists, my UI does one thing. When it doesnā€™t, the UI does something else.

@NoCodeDataArtisan in all cases, the value for the field denomination_list_number in Bubble DB is just blank. So idk how/why it converted to {ā€œPointerā€¦ā€ Basically, I need to believe that Things to JSON will do so reliably and consistently ā€“ even if that means consistently doing find and replace for null ā†’ empty brackets. Otherwise, itā€™ll just break my app.

1 Like

Following up, it looks like plugins such as jsoNest may output denomination_list_number to either or [1,2,3] based on my current DB, with no find-replace required. So I may end up using that for things to JSON conversion, then use the Assistant to transform into Bubble data.

1 Like

The values are produced by Bubble, and the plugin is responsible for converting Bubbleā€™s output into JSON format. The plugin itself does not create these values.


I apologize for the inconvenience youā€™ve experienced. I will address this use case to better manage such situations in the future.

@NoCodeDataArtisan Appreciate it. Fwiw, and after further investigation, it looks like my best option might generating the JSON using Bubbleā€™s Data API. Afaict this consistently uses empty brackets by default for empty lists (vs. ā€œnullā€ or {"Pointerā€¦)).

1 Like