I have array something like this:
var array1 = [
{"name":"a","groups":["xxx","yyy"]},
{"name":"abc","groups":["xxx","yyy"]},
{"name":"abcd","groups":["zzz","xxx","yyy"]}
];
and
var array2 = ["xxx","yyy"];
I need to return the entire index of array1 when both "xxx" and "yyy" of array2 matches only to the "xxx" and "yyy" of array1.
Like in this example, it should only return array1[0] and array1[1]. Any help will be greatly appreciated. Thank you.