I've encountered an issue while trying to parse the string below, as it contains a character ('****').
JSON.parse("{\"data\":\"value \"}")
This results in an error being thrown:
Uncaught SyntaxError: Unexpected token in JSON at position 15
How can I resolve this problem?
Note: I am looking for a generic solution as I need to skip all special characters that may appear dynamically. Is there a way to achieve this?