title: Extract Max/earliest date from JSON message in dataweave 2.0
body: <p>My message structure:</p>
  
  <pre><code>{
      "empid": "abc",
      "homeCountry": "IND",
      "dateOfBirth": "1969-01-01",
      "personalInformation": [
          {
              "salutation": "Mr",
              "firstName": "Ram",
              "lastName": "Naresh"
          }
      ],
      "EmpInfo": [
          {
              "hireDate": "2000-01-01",
              "LevDate": "2018-07-25",
              "jobInformation": [
                  {
                      "isFullTimeEmployee": true,
                      "jobTitle": "Engineer",
                      "effectiveStartDate": "2018-01-05"
                  },
                  {
                      "isFullTimeEmployee": true,
                      "jobTitle": "Store Manager",
                      "effectiveStartDate": "2019-01-05"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>I would like to extract the max date and index of the same so that i can declare it as var and use it in the mapping.</p>