For eg.
[
{
x:1,
y:2
},
{
x:10,
y:20
},
]
How can I check if x exists in both of the objects inside the array?
DESIRED OUTPUT:
if x doesn't exist in even one object inside the array ---> false
else ---->true
I have tried using the array.prototype.find() method but not able to find the right logic to get the desired output.