How can I validate that a date shown in response is ordered in a desc

This is my response json
{
“ContactMethods”: [
{
“idClientContactMethod”: 1507408,
“contactMethod”: {
“description”: “TELEFONO TRABAJO”,
“idContactMethod”: 3
},
“value”: “”,
“acceptOffers”: false,
“isMain”: true,
“createdDate”: “02/12/2019 21:32:52”,
“createdUser”: “yyyy”,
“modifiedDate”: “06/12/2019 14:14:52”,
“modifiedUser”: “1911201”
},
{
“idClientContactMethod”: 1507388,
“contactMethod”: {
“description”: “TELEFONO”,
“idContactMethod”: 2
},
“value”: “987654321”,
“acceptOffers”: true,
“isMain”: true,
“createdDate”: “02/12/2019 17:33:30”,
“createdUser”: “1911201”,
“modifiedDate”: “02/12/2019 17:33:30”,
“modifiedUser”: “1911201”
},
{
“idClientContactMethod”: 1507386,
“contactMethod”: {
“description”: “CELULAR”,
“idContactMethod”: 1
},
“value”: “valffor”,
“acceptOffers”: false,
“isMain”: true,
“createdDate”: “02/12/2019 17:04:13”,
“createdUser”: “1911201”,
“modifiedDate”: “02/12/2019 17:04:13”,
“modifiedUser”: “1911201”
},
{
“idClientContactMethod”: 3533,
“contactMethod”: {
“description”: “TELEFONO”,
“idContactMethod”: 2
},
“value”: “8183548”,
“acceptOffers”: false,
“isMain”: false,
“createdDate”: “17/11/2019 00:00:00”,
“createdUser”: “Carga Inicial”,
“modifiedDate”: “22/11/2019 18:22:56”,
“modifiedUser”: “CARGA INICIAL”
}
]
}

and the validation I was doing in this way but it generates an error

var _ = require(‘lodash’),

// Parse the array returned in the response body (It is probably a stringified response)

responseArray = JSON.parse(responseBody);
console.log(responseArray);

pm.test(‘Validate Date ContactMethods’, () => {
// Use the responseArray here
var expectedSortedOrder = _.orderBy(responseArray.ContactMethods, [‘modifiedDate’],[‘DESC’]);

pm.expect(responseArray.ContactMethods).to.eql(expectedSortedOrder);

});

You need to split this in smaller problem.

I think you first should find a way to parse your date in something that JavaScript can understand.

Use currently have the format dd/mm/yyyy but JavaScript works with mm/dd/yyyy.