i am having a following data named answers
{ author:
{
id:
username:
},
_id:
answer:
}
{ author:
{
id:
username:
},
_id:
answer:
}......
is there any way i can use i can use arrays.contains("username") without actually looping through all of them and checking single one of them?
when i <%=answers%> i get the above mentioned result. but i want to check if the there is any answer by a specific username.
i need something like answers[author].username.contains("username")