Convert string formatted as array/list, to actual list or array

I have a string variable with a value of {“Hello”,“Good Bye”} and I want to convert this to a list or array. Oddly, there doesn’t seem to be a simple way to do this, unless I’m missing something. Seems like it should be able to recognize this as a properly formatted array and just convert it.

You can have the words separatted by coma and just use stringName.Split(Char.Parse(“,”)) and it will convert to a array without the coma

That’s not sufficient because the values may contain commas.

Hi @postwick ,

Why don’t you use like below

"Hello,Good Bye".Split(","c)

Because if , is in one of the values, it breaks.

Figured out it’s just easier to do JSON and deserialize it…

Array_String.xaml (9.3 KB)
Is like that?

That spits out , as one of the values. Using JSON format and deserializing it is the best solution.