let arr = [
{
id: 1,
count: '10'
},
{
id: 2,
count: '20'
},
{
id: 3,
count: '30'
},
]
arr = arr.map((item) =>{
return{
...item,
item.count: Number(item.count) // No value exists in scope for the shorthand property 'count'. Either declare one or provide an initializer.
}
})