find multiple items in array javascript code example
Example 1: javascript get same elments from multiple arrays
var result = arrays.shift().filter(function(v) {
return arrays.every(function(a) {
return a.indexOf(v) !== -1;
});
});
Example 2: typoescript find multiple items in array and return found
let names= ["Style","List","Raw"];
let results= names.filter(x => x.includes("s"));
console.log(results); //["List"]