JavaScript
Article
By Sam Deering

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 https://jsfiddle.net/ifandelse/6Yj5h/

--ADVERTISEMENT--

//helper function to convert json to string
stripJsonToString: function(json)
{
    return JSON.stringify(json).replace(',', ', ').replace('[', '').replace(']', '');
},
//email@email.com, example@example.com, somebody@somewhere.com
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account