If its necessary to get from the JavaScript array unique values only:
1 2 3 4 | function onlyUniqueArray(value, index, self) { return self.indexOf(value) === index; } var arr_unique_values = arr_values.filter(onlyUniqueArray); |
If its necessary to get from the JavaScript array unique values only:
1 2 3 4 | function onlyUniqueArray(value, index, self) { return self.indexOf(value) === index; } var arr_unique_values = arr_values.filter(onlyUniqueArray); |