sort array of object for some keys in javascript : I have one array of object like.

    [
     {
    id : 1,
    age : 23,
     },
     {
    id : 1,
    age : 25,    
     }
     {
    id : 2,
    age : 230,
     },
     {
    id : 2,
    age : 255,    
     }
     {
    id : 3,
    age : 232,
     },
     {
    id : 1,
    age : 215,    
     }
    ]

I need to get the final array by sorting with hightest age for each id. so final array will be.

    [
     {
    id : 1,
    age : 215,
     },
     {
    id : 2,
    age : 255,
     },
     {
    id : 3,
    age : 232,
     },

    ]