I am retrieving an array from the backend that looks like this:
["[a,b,c],[c,d,e],[e,f,g]"]
Once I grab this array, I place it inside a
<div id="op1">{{$option}}</div>
Now, I want to append additional items to it when I access it in JavaScript using
document.getElementById('op1').innerHTML
and then add these items into another array like this
var options=[document.getElementById('op1').innerHTML];
When I print it out using
console.log(options)
it displays
["[a,b,c],[b,c,d],[e,f,g]"]
This is not the desired format of the array, which should look like this
[[a,b,c],[b,c,d],[e,f,g]]
So my question is, how can I achieve the correct type of array and include more items in it?