I am trying to parse an array to JSON.parse which have single quotes around the keys and values. But it is throwing following error.
Uncaught SyntaxError: Unexpected token ' in JSON at position 1
The array which I am passing is :
["{'name': 'Jhon'}"]
Somehow, this string is not throwing any error.
['{"name": "Jhon"}']
Any help will be appreciated. Thanks in advance.