Let me explain, let's say I have this array:
var dateDouble_ARRAY = [Date : [Double] ]()
dateDouble_ARRAY = [2017-08-06 07:00:00 +0000: [11.880000000000001, 3.0],
2017-08-08 07:00:00 +0000: [5.0],
2017-08-01 07:00:00 +0000: [6.0],
2017-08-09 07:00:00 +0000: [6.0],
2017-08-02 07:00:00 +0000: [5.0],
2017-08-03 07:00:00 +0000: [6.5499999999999998],
2017-08-10 07:00:00 +0000: [2.0] ]
Each Date
key has a value that could consist of multiple Double
numbers.
What I would like to find out is how can I find the largest value in this array?
For example, in this case, the largest value is 11.880000000000001 + 3.0
= 14.88 (rounded) because the key-value pair consists of 2 Double
values, and 14.88 is larger then any other key-value pair.
However, if the array consisted of:
dateDouble_ARRAY = [2017-08-06 07:00:00 +0000: [3.0],
2017-08-08 07:00:00 +0000: [5.0],
2017-08-01 07:00:00 +0000: [6.0],
2017-08-09 07:00:00 +0000: [6.0],
2017-08-02 07:00:00 +0000: [5.0],
2017-08-03 07:00:00 +0000: [6.5499999999999998],
2017-08-10 07:00:00 +0000: [2.0] ]
Then the largest value would be 6.55 (rounded).
How can I achieve this?