How to get certain object based on Max value.

I have data that is not fetched from DB. 

The Data is in this format: 

List of Dictionary - 2 items

    • Dictionary
        • id - 1(Number (Integer))
          • Max_days - 54 (Number (Integer))
            • Max_amount - 36671(Number (Integer))
            • Dictionary
                • id - (Number (Integer))
                  • Max_days - 1317 (Number (Integer))
                    • Max_amount - 15158 (Number (Integer))

                  What I'm trying to achieve is that I get the whole object that has the highest value for Max_days. So as returning result I should get 

                  • Dictionary
                      • id - (Number (Integer))
                        • Max_days - 1317 (Number (Integer))
                          • Max_amount - 15158 (Number (Integer))

                        Can you help me, guys? Thx

                          Discussion posts and replies are publicly visible