How do I sort data within a table by when it was last updated?

On my application, a user can add data and it will appear in a table. They can then edit this data, I would like to make it so the data that is edited will move to the top of the table. Please could I get some help? I tried sortBy but wasn’t sure how to do it properly.


    var client = this.get('clientName');
    var number = this.get('clientNumber');
    var lastUpdated = moment(new Date());
    var createClient ='clientdetails', {
        client: client,
        number: number,
        lastUpdated: lastUpdated


{{each client in clientdetails}}

Thank you!!

Here’s an idea that may help you head in the right direction–;

var onSuccess = function(client) {
  //append row using js function insertRow(0) or use jquery 
  //delete row using js function deleteRow(current position) or jquery