Instantly share code, notes, and snippets.

Embed
What would you like to do?
brands.sort((a, b) => {
return a.label.localeCompare(b.label);
});
=> [
{ label: "!Solid", value: 668 },
{ label: "AllSaints", value: 2501 },
{ label: "Ben Sherman", value: 2124 },
{ label: "Côte et Ciel", value: 1532 },
{ label: "Drôle de Monsieur", value: 137 },
{ label: "Études", value: 17 },
{ label: "Samsøe & Samsøe", value: 1571 },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment