How To Convert A String To JSON

How can I convert a string to JSON object

You can use function JSON.parse, see example here

var string = '{"make":"Ford","model":"Mustang"}';
var jSONobject = JSON.parse(string);
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments