@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.)
@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.
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.
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.
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?
@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.
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.
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ā¦)).