Group by & sum in jQuery, javascript
there are some values in below format[[A,150,500,6000],[B,160,700,7000],[B,200,633,9000],[B,210,633,9000]]
i need to do group by & do sum
i need final output to be
A,150,500,6000
B,570,1966,2500
the above need to be achieved either with java script or j query