[{"ID":"2014022617242128506188b401e6499","BillID":"201311291649198196250E9B7F4FA75","Summary":"支付报纸费","SubjectID":"2013112917140625712506E9110C187","AidType":null,"AidSubjectID":"儿童热工","DebitSideAmount":0,"CreditSideAmount":2432,"AidName":"儿童热工"}]
1 var vJson = { AidName: "儿童热工", Summary: "支付报纸费" }; 2 3 delete eval(vJson).AidName; //通过内建的eval()函数把字符串转换json对象,然后删除指定的AidName标识
代码的效果图如下:
可以了,真的谢谢了
先将字符串转换为JSON对象,然后利用delete obj.AidName ,这个时候就去掉了这个键。