This may be a silly question but I invested more than half an hour to understand why it is not working. I have a 2D javascript array. Some of the elements in array are HTMl having anchor tag with href attributes.
I am trying to used JSON.parse("stringified2D array here") but it give me error as shown in this screenshot.
var cd = JSON.parse('[["header","This is some header"],["footer","<p>This addon is brough to you by <a href=\"https://www.accemy.com\">Accemy</a> and <a href=\"swgapps.com\">SW gApps</a></p>This is universal and appended to all add-on content"],["nslookup","NS Lookup allows to fetch DNS records from public DNS servers"]]');
It gives me error
Uncaught SyntaxError: Unexpected token h in JSON at position 88
at JSON.parse (<anonymous>)
at <anonymous>:1:15

json_encode()in PHP orJSON.stringify()in JS) or corresponding ready-to-use libraries.