how to convert a string to an object in Javascript? -
this question has answer here:
- safely turning json string object 20 answers
i know how convert string below object in javascript:
var string = '{"id":"50","actor":"1","subject":"1","object":"18","message":"a ajout\u00e9","status":"unseen"}'
in fact, after converting string above object, able access element of object. example, if convert string object called "obj" able access value of element "id" (which "50") in such way: obj.id
thanks in advance.
Comments
Post a Comment