Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
subhalaxmi
Level 7

Parse String Array

Hi Guys
Can you help me.

how can I parse a string array which is coming from server.



["One","Two","Three"]



How can I show it like One Two Three
0 Kudos
1 Reply
Komag
Level 9

Re: Parse String Array

bigString = ""
FOR EACH string IN myArray
bigString = bigString + string + " "
END FOR
bigString = Left(bigString, (Len(bigString) - 1) ) ' Keep all but the last space

If you want them in order:
bigString = ""
FOR i = 0 TO myArray.Count() -1
string = myArray[i]
bigString = bigString + string + " "
END FOR
bigString = Left(bigString, (Len(bigString) - 1) ) ' Keep all but the last space

And bigString.Trim() might do the trick of clearing the last space instead of using Left()
0 Kudos