JSFiddle - React, Tailwind, and code Playground

JavaScript

var bookmarks = [ { tags : ["apple"] },  { tags : ["pineapple"] }, {tags : ["orange"]}];
var matches = bookmarks.filter(function(x) {
    return _.intersection(['apple','orange'], x.tags).length > 0;
});
console.log(matches);
console.log(matches.length);