How to determine if Javascript array contains an object with an attribute that equals a given value?
No loop necessary. Three methods that come to mind: Array.prototype.some() This is the most exact answer for your question, i.e. "check if something exists", implying a bool result.
https://stackoverflow.com/questions/8217419/how-to-determine-if-javascript-array-contains-an-object-with-an-attribute-that-e