Instantly share code, notes, and snippets.

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