javascript convert string to string array code example
Example 1: js string to array
str = 'How are you doing today?';
console.log(str.split(' '));
>> (5) ["How", "are", "you", "doing", "today?"]
Example 2: convert matrix string to matrix javascript
string = '[[1, 2], [3, 4], [5, 6]]'
string = JSON.parse(string)