I have below JSON response from API:
let response = [
{"Id": 1, "Name": '"Tony"'}
{"Id": 1, "Name": '"leonne"'}
]
I want to remove the double quotes from this and have the final object like below:
response = [
{Id: 1, Name: 'Tony'}
{Id: 1, Name: 'leonne'}
]
I tried using below way but not working:
response.forEach(item=> {
item.Name= item.Name.replace(/"/g, '');
});
1