Calculating 2 object keys/columns from array of objects Javascript [duplicate]
问题 This question already has answers here : How to aggregate objects properties? (6 answers) Closed 4 months ago . So I was working on the some column merging and filtering,but I am having trouble calculating 2 object keys (columns) from an array of objects and then mapping that result to an object key to a new array Example: var foodRevenue = [{ "Month": "2011-01", "week1_Revenue": "100.00", "week2_Revenue": "300.51", "Week3_Reenue": "200.09", "Month1_TotalRevenue": "0" }]; I want to calculate