I have a javascript string representing a tree structure as [a[b,c]d[e]] -- meaning that the tree has 2 top level nodes a and d (a has 2 subnodes b and c & d has a subnode e).
I want a JSON representation of the above tree. (The key could be the same as value). I want to do the transformation programmatically for any number of nodes and subnodes.
I want to know if there exists some code that I can reuse.