for example, there is now an array
{
"msg": "success",
"code": 0,
"list": [{
"mealId": 17,
"mealName": "",
"protein": 1,
"typeList": null,
"df": 1,
"cho": 1
}, {
"mealId": 18,
"mealName": "",
"protein": 1,
"typeList": null,
"df": 1,
"cho": 1
}]
}
define sumCHO / sumProtein / sumDF
how to add and assign cho / protein / df in an array according to the length of the array