shah rushabh shah rushabh - 10 months ago 50
JSON Question

How can I convert following string to JSON?

Hello everyone PHP is parsing JSON from MYSQL database but it converted to string now how can I convert this string into JSON from JAVASCRIPT side?



Answer Source

Basically, This should work, provided your string is a proper JSON formated:

var obj = JSON.parse("{ your: 'string', goes: 'here' }")