DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
order array of objects by id javascript
items.sort(function(a, b) { return a.id - b.id || a.name.localeCompare(b.name); });
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#order
#array
#objects
#id
#javascript
ADD COMMENT
Topic
COMMENT
Name
2+1 =
Submit