Answers for "in text includes in aray of objects"

0

in text includes in aray of objects

let arr = [
   {
    name: 'Jack',
    id: 1
   },
   {
    name: 'Gabriel',
    id: 2
   },
   {
    name: 'John',
    id: 3
   }
]
var r = arr.some(i => i.name.includes('Jack'));
console.log(r);
Posted by: Guest on February-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language