JavaScript
Result
Run
License
const json = { completed : true, applyid: 10, msg : "complete" }; const jsonString = JSON.stringify(json, (key, value) => { if(typeof value != "string") return value; }); const jsonStringWithSpace = JSON.stringify(json, (key, value) => { if(typeof value != "string") return value; }, 1); const jsonStringWithChar = JSON.stringify(json, (key, value) => { if(typeof value != "string") return value; }, "#"); console.log(jsonString); console.log(jsonStringWithSpace); console.log(jsonStringWithChar);
Console
expand_less
License
License
by DevDic
Close