I\'ve been trying to work out a problem I\'m having. I have an array with objects in it, like this:
var array = [
{
name: \"Steven Smith\",
Country
Quick answer I came up now:
let result = [];
for(let item of array)
{
for(let checkingItem of array)
{
if(array.indexOf(item) != array.indexOf(checkingItem) &&
(item.name == checkingItem.name || item.Age == checkingItem.Age))
{
if(result.indexOf(checkingItem) == -1)
{
result.push(checkingItem);
}
}
}
}
console.log(result);