In the following scenario, how can I search both label and value?
var countries = [
{ label: 'United Kingdom', value: '44', group: "Europe" },
{ label: 'United States', value: '1', group: "North America" },
{ label: 'Norway', value: '47', group: "Europe" },
{ label: 'Sweden', value: '46', group: "Europe" },
{ label: 'Germany', value: '49', group: "Europe" }
];
text = 'uni';// Works fine since 'uni' is present in label
text = '44' // Should lookup value as well and return 'United Kingdom'
var suggestions = countries.filter(n => n.label.toLowerCase().includes(text));
console.log(suggestions);
n => n.label.toLowerCase().includes(text) || n.value == text?var suggestions = countries.filter(n => (n.label.toLowerCase().includes(text) + n.value.toLowerCase().includes(text)));