Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmjio/1555899 to your computer and use it in GitHub Desktop.
Save dmjio/1555899 to your computer and use it in GitHub Desktop.
how to sort an array of objects in javascript
data.sort( function(a, b) {return b.count - a.count} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment