Forum Academy Marketplace Showcase Pricing Features

Plus item to List (array) with quotation marks

I need to submit a list to an API. This is a text array. Values should be submitted in the format of [“text1”,“text2”,“text3”] and so on. I can employ quotation marks when storing to a Bubble database using the ‘add’ command, but I cannot seem to wrap my text statement in quotation marks using the ‘plus item’ command (in this case, there is a state variable that is a list of texts for submission). Is anyone aware of how can create a statement such as ‘list_of_foo:plus item “dynamic text bar”’?

1 Like

It’s simpler to keep the list in store without quotes, then to add quotes when converting the list to a string using :join. If your items could have quotes in them, you can escape them by :replace with "

Thank you mishav. Your answer with a little experimentation worked. Hardcoding the first and last brackets and quotation marks and joining the array inside gives an effective solution. So it appears as [" your_list_in_here: join with " “,” " "]

2 Likes