in reply to Getting first and last element value of a hash loop
Depending on where these values are populating from, there would be a high chance of having them sorted in the proper order so that you would not need to do any sort and could just pick up the first and last elements of these arrays.
But of course, this is just a suggestion, you might not have the freedom to change this data structure for other reasons.
|
|---|