I want to check if a object value exist in a array of objects with "some".
I only can find that the object hobbys exist in the array with "some"
"users": [
{
"type": "User",
"name": "Sarah",
"hobbys":
{
first: "something1",
second: "something2"
}
}
]
users.some(item => item.hobbys); // true
I want to check if "first" value in "hobbys" exist.
users.some(user => user.hobbies.first);user.hobbiesdoes not exist