Super simple problem i'm having an issue with - I want to filter and replace using
.replace(/hackerone.com//g, "")
to remove 'hackerone.com/' from my object but its commenting out the code whenever i try. Is this something i can assign a var to?
const newObject = items.map((item) => {
const companyNoCom = item["company"].replace(/hackerone.com/g, "")
newItem = {...item, company: companyNoCom}
return newItem
})
console.log(newObject)