W3Schools Documentation Array Includes
fetch("https://jsonplaceholder.typicode.com/todos")
.then((response) => response.json())
.then((todos) => {
let matched = false;
const todoIds = todos.map((t) => t.id);
console.log(todoIds);
matched = todoIds.includes(28);
console.log(todos, matched);
});