What you are looking for is the .sort method sorting by an object property .sort((a,b)=>b.property-a.property)