My database stores a nested array as a string, which is then returned as a string when fetched. I am facing the challenge of converting this string back into a nested array. Despite attempting to use JSON.parse for this purpose, I encountered the following error:
VM5481:1 Uncaught SyntaxError: Unexpected token ' in JSON at position 2
In essence, my goal is to transform the following:
"[['E4', '4n.'], ['D4', '8n'], ['C4', '4n'], ['D4', '4n']]"
into this:
[['E4', '4n.'], ['D4', '8n'], ['C4', '4n'], ['D4', '4n']]
using JavaScript.