Beginner Vue ask how to sum the objects in the array?

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

Aug.21,2021

let choTotal = list.reduce((totle, item) => total + item.cho)
let proteinTotal = list.reduce((totle, item) => total + item.protein)
let dfTotal = list.reduce((totle, item) => total + item.df)

basic positive solution on the first floor

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4d475-44f0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4d475-44f0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?