Why doesn\'t JSON.stringify() display prop2?
var newObj = { prop1: true, prop2: function(){ return \"hello\"; }, prop3: false }; alert( JSON.str
Here is another way with using a .prototype. You can add an function to stringify
JSON.stringify(obj, function(k, v) { if (typeof v === 'function') { return v + ''; } return v; });