How to remove a property from a javascript object





var myJSONObject =
       
{"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"};

추가
object["property"] = value;
//or
object
.property = value


삭제
delete myJSONObject.regex;
// or,
delete myJSONObject['regex'];
// or,
var prop = "regex";
delete myJSONObject[prop];


+ Recent posts