shah rushabh shah rushabh - 2 months ago 6
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?

JSON:

"StartTime":"[\"9:00pm\"]"

Answer

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

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