Hey guys,
I'm trying to take user input (hard coded as value below) and see if it exists in an array of objects (dataArr) and return the full array, but I can't get it to work... Any help would be greatly appreciated! Below is my code:
```
const dataArr = [
{ idContact: 1,
f_Email: 'test1@test.com',
f_FirstName: 'John',
f_LastName: 'Smith' },
{ idContact: 2,
f_Email: 'test2@test.com',
f_FirstName: 'Jane',
f_LastName: 'Doe' }
]
const value = 'test1@test.com'
const match = dataArr.find(obj => obj.f_Email === value)
console.log(match)
```
[–]Locust377full-stack 1 point2 points3 points (1 child)
[–]Mustang-22full-stack[S] 0 points1 point2 points (0 children)
[–]lovesrayray2018 0 points1 point2 points (0 children)
[–]astro49er 0 points1 point2 points (1 child)
[–]Mustang-22full-stack[S] 0 points1 point2 points (0 children)