I have an array of objects. Each object has a lot of keys (more than 100) and some of these keys can have special chars that I would like to remove.
I try to do what I want in this way:
const result = data.map(datum => {
const keys = Object.keys(datum)
const replacedKeys = keys.map(key => {
const newKey = key.replace(/[.|&;$%@%"<>+]/g, '')
})
// ??
})
But I'm sure it's not the right way..