我需要遍历数组数组并计算每个数组的总和。Json 是一个带有 x,y 坐标数组的 kendo-ui 图表系列。我需要返回 x,y 值的总和。linq.js 或 javascript 将工作。感谢 JSON
var =series = [{
"style":"smooth",
"color":"blue",
"data":[
[600,30000],
[800,60000],
[1100,100000]
],
"name":"Subject Property",
"removeByNames":[
["Product1"],
["Product2"],
["Product3"]
],
"$$hashKey":"object:30"
}]
所以对于这个例子,我需要结束这个
var newSeries = [{
"style":"smooth",
"color":"blue",
"data":[
[30600],
[60800],
[101100]
],
"name":"Subject Property",
"removeByNames":[
["Product1"],
["Product2"],
["Product3"]
],
"$$hashKey":"object:30"
}]