Given the following object which is being returned from a backend db table:
let a = {
id: 1,
menu_icon: "<AssessmentIcon />"
}
how can I remove the double quotes around "<AssessmentIcon />"
which is a material-ui icon ?
I just need this to be <AssessmentIcon />
- no double quotes.
I have tried a.menu_icon.slice(1, -1)
but this removes the actual tags <
and >