jQuery JSON to String

By Sam Deering

Simple JavaScript function to convert a JSON string into a comma seperated item quoted list for display.

Also see jsfiddle for JSON.stringify

//helper function to convert json to string
stripJsonToString: function(json)
    return JSON.stringify(json).replace(',', ', ').replace('[', '').replace(']', '');

No Reader comments


Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in JavaScript, once a week, for free.