Is there a function to find if a array has two or more keys in them? I want the function to return True / False if the target Array has all the keys in result Array.
//Both must be in the array, not in that order tho.
var target = ['love', 'sweden'];
//Object that i want to search.
var result = [{
title: "Love in Norway!",
tags: ['love', 'norway', 'birds', 'summer']
}, {
title: "Love in Sweden!",
tags: ['love', 'sweden', 'car', 'blue']
}, {
title: "I am in Norway!",
tags: ['mytag', 'sweden', 'summer', 'love']
}, {
title: "Love in randowm!",
tags: ['love', 'norway', 'birds', 'summer']
}, ];
myfunction(result[x], target, function (isThere) {
// isThere of [x] = false;
// isThere of [x] = true;
// isThere of [x] = true;
// isThere of [x] = false;
});