@simon100
As Woland mentioned, you can accomplish this in Javascript.
You likely want to build a 2D array (https://www.w3schools.com/js/j...) such that the Array is made of short arrays that contain the Value & the Position.. So you might have [50.33,2] where 50.33 is the max volume, and 2 the position it is in.
So your array may look like this (if it has 5 positions) [[50.33,1],[20,2],[10,3],[15,4],[30,5]]
You could then use the Array Sort feature on this array (https://www.w3schools.com/js/j...) to sort by the Volume level (first value in each sub-array).
This could give you this array: [[50.33,1],[30,5],[20,2],[15,4],[10,3]]
See how the value levels are now in descending order: 50.33, 30, 20, 15, 10
In this way, you can determine that the highest value came from output position 1, and the second highest volume came from output position 5
Hopefully that gets you started.