Skip to content

Instantly share code, notes, and snippets.

@lgarciasbr
Created May 12, 2018 03:01
Show Gist options
  • Select an option

  • Save lgarciasbr/ac5482424480d762ead1224158710410 to your computer and use it in GitHub Desktop.

Select an option

Save lgarciasbr/ac5482424480d762ead1224158710410 to your computer and use it in GitHub Desktop.
TypeScript - Sort Array with Objects
array.sort(function(a, b){
if(a.name < b.name) return -1;
if(a.name > b.name) return 1;
return 0;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment