filter falsy valeus
filter by item property
array filter
Array.prototype.filter()
filter() 메서드는 주어진 함수의 테스트를 통과하는 모든 요소를 모아 새로운 배열로 반환합니다. arr.filter(callback(element[, index[, array]])[, thisArg]) 테스트를 통과한 요소로 이루어진 새로운 배열. 어떤 요소도 테스트를 통과하지 못했으면 빈 배열을 반환합니다. filter()는 배열 내 각 요소에 대해 한 번 제공된 callback 함수를 호출해, callback이 true로 강제하는 값을 반환하는 모든 값이 있는 새로운 배열을 생성합니다.
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

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


Seonglae Cho