Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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