JS Periksa apakah array kamus berisi
const myArray = [{key1: "value1", key2: "value2"}, {key1: "value4", key2: "value8"}, {key1: "value1", key2: "value3"}, {key1: "value1", key2: "value32"}]
if(myArray.some(e => e.key1 == 'value1')) {
console.log('Exists');
}
Run code snippet
Defiant Dove