I have list that looks like this :
{1: "a", 2: "a", 3: "c", 4: "c"}
I want to check if there is "c" in that list. This is how part of my code looks :
answer= {1: "a", 2: "a", 3: "c", 4: "c"}
answer[indexString as keyof typeof answer] = value;
if ("c" in answer) {
console.log("true");
}
I don't know why it only check the id 1,2,3,4 value not the string "a","b", "c". Really appreciate if anyone could help me on this