I have an Array, like this one:
let myarr = [
{type:"a", class:"x", value:"p"},
{type:"b", class:"x", value:"r"},
{type:"a", class:"y", value:"p"}
];
I need to use Array.includes to check whether an object with class=y is in this array.
I need to check it with myarr.includes({condition});
I could simply compare the whole object but I don't know how to use a key of the object to check.
includes. you need a different approach. whyincludes?myarr.includes? Thats not the right method for the jobmyarr.some(x=>x.class=='y')??