Remove leading comma from a string

I have the following string:

",'first string','more','even more'"

I want to transform this into an Array but obviously this is not valid due to the first comma. How can I remove the first comma from my string and make it a valid Array?

I’d like to end up with something like this:

myArray  = ['first string','more','even more']

11 Answers
11

Leave a Comment