Answers for "check object value includes"

0

javascript object includes

const person = {
  first_name: "Sam",
  last_name: "Bradley"
};

Object.values(person).includes("Bradley");
Posted by: Guest on May-15-2021
0

check if an object contains a value in javascript

var obj = { a: 'test1', b: 'test2' };
if (Object.values(obj).indexOf('test1') > -1) {
   console.log('has test1');
}
Posted by: Guest on April-29-2022

Code answers related to "check object value includes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language