I have an array of items as follows:
myarray = [
    {
      somedate: "2018-01-11T00:00:00",
      name: "John Doe",
      level: 6000
    },
    {
      somedate: "2017-12-18T00:00:00",
      name: "Don Jhoe",
      level: 53
    },
    {
      somedate: "2016-12-18T00:00:00",
      name: "Jane Doe",
      level: 100
    },
    {
      somedate: "2018-10-18T00:00:00",
      name: "Dane Joe",
      level: 1
    }
]
I'm trying to figure out how to sort this array so that it is sorted by date. I know how to sort an array of simple properties:
Sort Javascript Object Array By Date
array.sort(function(a,b){
      // Turn your strings into dates, and then subtract them
      // to get a value that is either negative, positive, or zero.
      return new Date(b.date) - new Date(a.date);
    });
But how is it best handled to sort an array by its items properties?
EDIT: Yes, those really are improper date strings provided by a strange web service that doesn't handle time.
 
     
    