I have a sample array of objects as below, I want the one of the object in the array which has name Test.
**Results: [
{ Name: "Test",
Age :21
ChildrenObj:
},
{ Name: "Something else",
Age :21
ChildreObj
}**
I am using the below code to find it, and it is not returning me the correct data
var names= (_un.find(data.Results, function(item) {
return item.Name= "Test";
}));
any direction will be appreciated.
return item.Name=="Test"Test for equality, don't do assignment.