var str = '""{""as"":""N9K-93180YC-EX""}""';
I attempted to remove the extra quotes using a regular expression:
var str1 = str.replace(/\"/g, "");
After removing the extra quotes, the string now looks like "{as:N9K-93180YC-EX}"
. However, when I try to parse it with JSON.parse(str1)
, I encounter the following error:
Uncaught SyntaxError: Unexpected token an in JSON at position 1.
If anyone could provide assistance on solving this issue, it would be greatly appreciated.
Thank you in advance!