How to convert a list of texts to a text(string)? Like join() in JavaScript

I need to convert a list of texts to a text(string) for ex: [blue, red, purple](list of texts) to “blue red purple” (single text)

In JS, I would use the join() method (JavaScript Array join() Method)

:format as text may be your friend here.

1 Like

Isn’t there a :joined with operator in Bubble? (There’s also the requisite :split by operator for the converse operation.)

2 Likes

Yup, @keith, Bubble has a join with operator, and it can be used in this situation to join the texts with a space, of course. Jared is also right because :format as text can be used, too, with the delimiter being a space. So, in other words, @charleslcts, as with pretty much all things Bubble, you’ve got options.

3 Likes

And, BTW, operators like :join with and :split by are literally just their JavaScript equivalents under the hood, @charleslcts. Though you’ll soon start wondering where all of the rest of the array/string methods are and may become angry at Bubble. :wink:

2 Likes