Order data by date from json in ionic 3

ı am realy confused about sorting data by date from json.
my json api like this.

{“data”:[{“id”:2,“start_time”:“2019-06-26 00:00:00”,“delete”:0,“type”:1,“created_at”:null,“updated_at”:null}]}
how can ı sort date for depend on start time.

var data = [{"start_time":"2019-06-26 10:00:00"},{"start_time":"2019-06-26 07:00:00"},{"start_time":"2019-05-26 00:00:00"}]
data.sort(function (a, b) {
	return a.start_time.localeCompare(b.start_time);
});

console.log(JSON.stringify(data))

//output  
//[{"date":"2019-05-26 00:00:00"},{"date":"2019-06-26 07:00:00"},{"date":"2019-06-26 10:00:00"}]

hi
thank you for responding but ı cannot use like this.

var data = [{“start_time”:“2019-06-26 10:00:00”},{“start_time”:“2019-06-26 07:00:00”},{“start_time”:“2019-05-26 00:00:00”}]

ı have to pull from json. Can you help me.

You are getting the data from API. subscribe that data and store that in variable.

data = {“data”:[{“id”:2,“start_time”:“2019-06-26 00:00:00”,“delete”:0,“type”:1,“created_at”:null,“updated_at”:null}]}

var arraydata = data.data
//now arraydata = [{“id”:2,“start_time”:“2019-06-26 00:00:00”,“delete”:0,“type”:1,“created_at”:null,“updated_at”:null}]

so you can access the data key object from jSON object array.