typescript remove elements from array where exist in another array code example Example: remove item from array if exists in another array $filteredFoo = array_diff($foo, $bar);