I have this string:
items = "['item1', 'item2']"
i need it to be a javascript array like this:
items = ['item1', 'item2']
i try this and it works:
items.replace("]","").replace("[","").replaceAll("'","").split(",");
and the result I obtained was as expected:
['item1', 'item2']
The question is: can the same be done in a simpler way?