shah rushabh shah rushabh - 1 year ago 81
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' }")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download