I have a string as follows:
my_string = "['page1',5],['page2',3],['page3',8]";
I want to convert this into the following:
my_array = [['page1',5],['page2',3],['page3',8]];
I know that there is a split function in which i have to specify delimiter.When i did this:-
my_string.split(',');
I got the following result:
["['page1'", "5]", "['page2'", "3]", "['page3'", "8]"]