I am currently working with an object that contains an array of objects structured like this:
{
0: [
{ value:1}
{ value:2}
{ value:3}
]
}
My goal is to determine if a specific element is present inside the array. I have attempted to achieve this by looping through the array like so:
Object.values(object).some(el => el.value === someNumber)
. However, no matter the value of someNumber
, the result is consistently false. Does anyone have any insight into why this might be happening? Keep in mind that someNumber
is a variable that can take on any value.