I have a string parsed from a uint8array. something like
"[[[Class1(a1)],[Class2(a2)],[Price(a1,100)]],[[Class3(a3)],[Price(a3,200)]],[]]"
or
"[[],[[Class1(a1)],[Color(a1,200)]],[[IsLight(a1,0)]]]"
This is a 2D array with three fixed second level arrays => [ [], [], [] ], but the elements inside these three arrays are denoted using square brackets as well, which makes it very hard to find a pattern to use str.slice. JSON.parsedoesn't work either.
Is there a way to actually convert this string to an array in Javascript?
Class1(a1)is a function or just a string?