Lodash check value in a array case insensitive
You can pass a function to _.some
where you compare the name in case insensitive way, for example:
_.some(divisionList, function(division) {
return division.Name.toLowerCase() === divisionName;
})
The "native" javascript (ES6) solution using Array.some()
function (as an alternative):
var divisionName = "division 2", // for example
hasDivision = divisionList.some((obj) => obj["Name"].toLowerCase() === divisionName);
console.log(hasDivision); // true