Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Check propery of an objects array

const arrayOfObject = [{ id: 1, name: 'john' }, {id: 2, name: 'max'}];

const checkUsername = obj => obj.name === 'max';

console.log(arrayOfObject.some(checkUsername))
Comment

PREVIOUS NEXT
Code Example
Javascript :: obfuscation js 
Javascript :: jquery remove multiple words from string 
Javascript :: how to find missing number in integer array of 1 to 100 in javascript 
Javascript :: google places autocomplete empty latitude 
Javascript :: inheritance in class in js 
Javascript :: how to redirect to another page in react js on button click 
Javascript :: upload file to database with axios and formData 
Javascript :: check if form bootstrap is valid js 
Javascript :: model export in node js 
Javascript :: javascript update multiple values of an object 
Javascript :: js display image from external url 
Javascript :: react-load-animations 
Javascript :: how to find a name of class from page in jquery 
Javascript :: vue date filter component 
Javascript :: order by mongodb 
Javascript :: login with facebook in react 
Javascript :: Sign in with Apple JS 
Javascript :: js subtract days 
Javascript :: get window height javascript 
Javascript :: alpine js 
Javascript :: on window resize js 
Javascript :: id button click jquery 
Javascript :: start date time picker from day to year in html 
Javascript :: how to append data to a form data in javascript 
Javascript :: callback in react 
Javascript :: jquery effect methods 
Javascript :: ember js 
Javascript :: express post 
Javascript :: use jquery in project using NPM 
Javascript :: swift encode json 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =