I have the following array with me. And my aim is to create a new array by removing duplicate values from this array.
var xDataValuesdash = [ [ 'Anantapur', 10, '#C21466' ],
[ 'Anantapur', 20, '#A983D0' ],
[ 'Chittoor', 30, '#A993D0' ],
[ 'Anantapur', 30, '#544DDF' ],
[ 'Anantapur', 4, '#A994D0' ],
[ 'Chittoor', 40, '#544BDF' ] ];
ie, The resultant array must be
var new_xDataValuesdash = [[ 'Anantapur', 64, '#C21466' ],
[ 'Chittoor', 70, '#544BDF' ]];
While removing duplicates its value must be added to the unqiue value.