Tag Archives: javascript

Excluding object properties while json-stringifying

Example to exclude the properties of javascript object. var graphic= new GraphicalElement(); graphic.objectType = “CIRCLE”; graphic.data = { radius: 20 }; //Removes the property objectType from graphic object graphic.toJSON = function() { var attrs = {}; for (var attr in … Continue reading

Posted in javascript | Tagged , | Leave a comment