I use this code
labels.map((label, key) => {
const xAxis = (parseInt(label, 10)).toFixed(0);
const yAxis = parseInt(this.props.dataSet.datasets[0].data[key], 10);
const arrayAxis = [xAxis, yAxis];
data.push(arrayAxis);
return arrayAxis;
});
then i get the data list
["1", 1]
["2", 1] // duplicate
["2", 1] // duplicate
["3", 1]
["4", 1]
["4", 1]
["5", 4]
["6", 4]
["7", 4]
["8", 4]
["9", 4]
.....
....
...
How I can remove duplicate array from the array list using filter?
label.