How to properly display the text from an array in a label
-
Hello,
I would like to display the text of an array in a label without the parentheses and the “” just the text.
From
[Apple””Cat””Bear]
To
Apple Cat BearIs there an easy way to do that?
Thanks.
-
You can use a Text Operation behavior and use the
Text with Formatmode. In the input text, you can enter a format. Every instance of%sis replaced with an element - so you can have your input text be%s %s %sand those would automatically be populated with one element each, showing the first 3 elements of the array.
-
However, if your array is going to have variable amount of elements, then you will have to use a Loop to iterate through the array. First, you have a Value behavior and before looping, you make it empty so it starts with nothing in the value. Then in the loop, you would combine the value with the current element of the iteration. After the loop, the value behavior will have all the elements, separated by spaces.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login

