const arr = array.slice().sort((a, b) => b.time - a.time)