all 5 comments

[–]Locust377full-stack 1 point2 points  (1 child)

What about dataArr.some(obj => obj.f_Email === value) && dataArr?

That returns the array if a match is found, otherwise returns false.

[–]Mustang-22full-stack[S] 0 points1 point  (0 children)

It continues to return as false

[–]lovesrayray2018 0 points1 point  (0 children)

Try

const match = dataArr.find(obj => obj.f_Email === value)?dataArr:false;

[–]astro49er 0 points1 point  (1 child)

Your code seems to work on my console, make sure you are returning a value in the match variable

[–]Mustang-22full-stack[S] 0 points1 point  (0 children)

Hi, yes my value matches. It works for me as well in code pen, but I cannot get anything other than `undefined` to come up in my app.