I have the following string
const item = "CACHED ITEM 2"
and I have the following array
const names = ["CACHED ITEM 1"];
now I am using underscore to check if item in the array of name using the following code
if (_.contains(names),item){
console.log(true)
}else{
console.log(false)
}
If I run the above code the result is true event though item variable does not have an exact match in names array. How can I enforce exact match