Filter the array by taking the higher points (max y value) and only. Keep one per slot. There are 2 different slots, the smallest one will have the new property close to true
close
array of all the points
Options
Filter the array by taking the higher points (max y value) and only. Keep one per slot. There are 2 different slots, the smallest one will have the new property
close
to true