Say you have to find out the names of the students that are in both teamBlue & teamRed
Suppose that the arrays are of unequal length as shown below, how would you go about approching this.
if someone could just point me in the right direction id really appreciate it
teamRed: [
{
"id": '1',
"name": "jenny"
},
{
"id": '2',
"name": "kenny"
},
{
"id": '3',
"name": "mike"
},
{
"id": '4',
"name": "danny"
}
]
teamBlue: [
{
"id": '1',
"name": "joey"
},
{
"id": '2',
"name": "kenny"
},
{
"id": '3',
"name": "mike"
}
]