Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort array of objects javascript by properties value

objs.sort((a,b) => (a.last_nom > b.last_nom) ? 1 : ((b.last_nom > a.last_nom) ? -1 : 0))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #array #objects #javascript #properties
ADD COMMENT
Topic
Name
9+1 =