问题描述
{"name":"zhangsan","id":1042732,"type":"2","status":0,"password":"123456789"}如何把其中的type 键值替换成空 我需要一个{"name":"zhangsan","id":1042732,"status":0,"password":"123456789"}求一个正则表达式 匹配"type":"2",
解决方案
.replace(/"type":".*?"/,'type:""')
时间: 2024-12-25 02:07:50