Add one more else if
to your code:
else if (key === "score") {
const low = filters[key] === "20" && user["score"] <= filters[key];
const medium =
filters[key] === "50" && user["score"] < 50 && user["score"] >= 21;
const high =
filters[key] === "70" && user["score"] < 70 && user["score"] >= 51;
const veryHigh = filters[key] === "71" && user["score"] >= 71;
if (low || medium || high || veryHigh) {
return user;
}
}
Also, send values from HTML:
<option value="71">Very High</option>
<option value="70">High</option>
<option value="50">Medium</option>
<option value="20">Low</option>
https://angular-ivy-xtgnv5.stackblitz.io
Also, please mark as right, if your problems gets solved.
solved How can I another filter for score which will show the results matching the range?