将对象JSON.stringify后采用replace来改变属性key
let object = {
oldName1:'11',
oldName2:'22',
}
object = JSON.parse(JSON.stringify(object ).replace('oldName1', 'newName1').replace('oldName2', 'newName2'));
将对象JSON.stringify后采用replace来改变属性key
let object = {
oldName1:'11',
oldName2:'22',
}
object = JSON.parse(JSON.stringify(object ).replace('oldName1', 'newName1').replace('oldName2', 'newName2'));