I have array of objects. I want to find the value in key which matches the word and if it's there it should return me true in console otherwise false.
I have array of objects like this:
[
{
"groupName": "harry",
},
{
"groupName": "mike",
}
]
And I want to match this key groupName with value like Amy. As we can see Amy in not there in groupName so it should return me false in console otherwise true if any of the groupName value is Amy.
How to achieve this using Javascript?