Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
subhalaxmi
Visitor

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 1
Komag
Roku Guru

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.