📜  使用正则表达式重命名对象键 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:14.445000             🧑  作者: Mango

代码示例2
const result = data.map(datum => Object.assign(...Object
    .keys(datum)
    .map(key => ({ [key.replace(/[.|&;$%@%"<>+]/g, '')]: datum[key] }))
));