JSFiddle - React, Tailwind, and code Playground
by John Wick
JavaScript
var bookmarks = [ { tags : "apple" }, { tags : "pineapple" }, {tags : "orange"}];
var matches = bookmarks.filter(function(x) {
return _.indexOf(['apple','orange'], x.tags) > -1;
});
console.log(matches);
console.log(matches.length);
var fruits = ["apple", "banana"];
var tag = "banana";
if (_.indexOf(fruits, tag) > -1) {
console.log('Found!!!');
} else {
}