let request = {0: true, “SYSTEM_ID”: “系统A”, “POLICY_NO”: “保单号”,“ACCOUNT_KEY_ATTR”:“40”,“POL_CODE”:“428”,“BP_NAME”:“张无忌”} ;
需求:去掉 0:true 特殊字符;
方法:delete request [“0”];
结果: request = {SYSTEM_ID: “系统A”, POLICY_NO: “保单号”, ACCOUNT_KEY_ATTR: “40”, POL_CODE: “428”, BP_NAME: “张无忌”}
总结:
delete request [“name”];//即可删除name属性,返回true,不可删除则返回false;
javascript中的delete方法使用(json数据如何去掉特殊字符)
最新推荐文章于 2023-07-04 13:54:10 发布