check if one array has items of another array react code example
Example 1: check if array values exists in another array
$result = !empty(array_intersect($people, $criminals));
Example 2: check if array exists in another array javascript
const found = arr1.some(r=> arr2.indexOf(r) >= 0)