let input segment_arr=[ [[1,4],[4,5] , [[5,6],[7,8]] , [[9,6],[7,8]] , [[1,4],[4,5]] , [[10,6],[7,8]] ]
output_segment_arr=[ [[1,4],[4,5]] , [[5,6],[7,8]] , [[9,6],[7,8]] , [[10,6],[7,8]] ]
In my segment array, , the elements are in the form of [ [x1,y1] , [x2,y2] ] which represents 2 points that form a segment. May I know how to find the unique of this segment array so that it removes all the duplicates?
I will really appreciate an help I can get :)