How do you compare two arrays, especially if the first array is an object with multiple parameters?
truthCheck([
{ "user": "Tinky-Winky", "sex": "male" },
{ "user": "Dipsy", "sex": "male" },
{ "user": "Laa-Laa", "sex": "female" },
{ "user": "Po", "sex": "female" }
], "sex");
I thought of looping through first array, then check to see if 2nd array exists on the first one. Output the answer. Every time I do this, I get an empty array or in some cases just number 0, 1, 2, 3.