Currently I'm working with JavaScript objects where if the ID of a person is found in a team array, log the matches in console.
var employees = {
"team1": [3,0],
"team2": [1,2],
"people": [{
"id": 0,
"name": "John",
"description": "test test test",
"img": ""
}, {
"id": 1,
"name": "Adam",
"description": "this is a test",
"img": ""
}, {
"id": 2,
"name": "Fred",
"description": "fjdk;sf;lsd,;fl,s;l",
"img": ""
}, {
"id": 3,
"name": "Bill Murray",
"description": "fndsjlfnlskdm",
"img": ""
}
}]
};
What would be the best way to accomplish this? I know that its kind of a vague question but I'm afraid, I'm getting sucked down the vortex that can be Google and I think I'm making it more difficult for myself than it needs to be. If anyone has any suggestions on how to accomplish this, I'd love some help going in the right direction. Thank you.