var x = [
{
"cumulativeCustomerNum": "10147",
"addCustomerAdd": "4",
"drainCustomerNum": "6",
"salesmanDeleteCustomerNum": "5",
"customerDeleteSalesmanNum": "7",
"salesManName": null,
"salesmanId": "0",
"deport": null,
"dateString": "2022-05-11"
},
{
"cumulativeCustomerNum": "10148",
"addCustomerAdd": "6",
"drainCustomerNum": "5",
"salesmanDeleteCustomerNum": "3",
"customerDeleteSalesmanNum": "3",
"salesManName": null,
"salesmanId": "0",
"deport": null,
"dateString": "2022-05-10"
}
]
var arr = [...x];
x.map((item,index)=>{
Object.entries(item).forEach(entry => {
console.log(entry);
if(parseFloat(entry[1]) == entry[1]){
arr[index].entry[0] = parseFloat(entry[1]);
}else{
arr[index].entry[0] = entry[1];
}
});
})
console.log(arr)
console