I have names in an ignore list file called Ignore.json
[
"George",
"Carl"
]
The file is called ignore.json
In my program I am reading the file into the ignore variable
var ignore;
ignore = require("./Ignore.json");
Now I want to see if my array element is not in that list then if it is not in that list output the code.
I know how to check if an element is in an array like:
for (list in lists) {
if(lists[list].to.toLowerCase() in ignore){
But if I want to check that it is not "in" the list, what is the opposite of in in javascript?
inoperator in this situation.inchecks whether an object has a certain property name.