I have the below array with me
scala> Array((65.0,53.0,54.0),(20.0,30.0,24.0),(11.0,19.0,43.0))
res3: Array[(Double, Double, Double)] = Array((65.0,53.0,54.0), (20.0,30.0,24.0), (11.0,19.0,43.0))
How to filter out the items from this array based on the third element ? ie , I am trying to get the item which has the least third element. ie, here the third elements are 54.0, 24.0 and 43.0 and
Expected output -
scala> Array((20.0,30.0,24.0))
res4: Array[(Double, Double, Double)] = Array((20.0,30.0,24.0))