I need to sum data for each department. This seems simple but my data's columns are not always in the same order. I'm sure there is a way to find the 'department column in an array then find the wages column and sum particular department names.
It just needs to work with dynamic data.
<tbody>
</tbody>
It just needs to work with dynamic data.
Name | Department | Wages | ||||
Smith, John | Admin | 1000 | ||||
Spalding, Sally | Sales | 500 | ||||
Clooney, George | Admin | 700 | Sales | 800 | ||
Revere, Paul | SAles | 300 | Admin | 1700 |
<tbody>
</tbody>