the time taken back by the backstage, how to care about the size of the time, I want to get the largest time
time(){
let data=[
{id:1,time:"2018-07-04 00:04:12"},
{id:2,time:"2018-07-04 00:14:12"},
{id:3,time:"2018-07-04 00:04:12"},
{id:4,time:"2018-07-04 00:00:12"},
{id:5,time:"2018-07-04 00:04:02"},
{id:6,time:"2018-07-04 00:24:52"},
{id:7,time:"2018-07-04 01:04:12"},
{id:8,time:"2018-07-04 05:04:12"},
{id:9,time:"2018-07-04 07:04:12"},
{id:10,time:"2018-07-04 00:00:00"},
]
for(var i=0;i<data.length;iPP){
console.log(data[i].time);
}
}
how do I compare these times and get the maximum time?