Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to sort an array of objects by a property value in javascript

let x = list.sort((a, b) => (a.name > b.name ? 1 : -1));
Source by devsheet.com #
 
PREVIOUS NEXT
Tagged: #sort #array #objects #property #javascript
ADD COMMENT
Topic
Name
4+2 =