JSFiddle - React, Tailwind, and code Playground

by Andrey Gershun

HTML

<script src="http://alasql.org/console/alasql.min.js"></script>
<span id="res"></span>

JavaScript

var arrOne = ['a', 'b' ,'c' ];
var arrTwo = ['option a', 'option c', 'option b', 'option d'];

var res = alasql('SELECT COLUMN _ FROM ? arrTwo WHERE EXISTS(SELECT _ FROM ? arrOne WHERE arrTwo._ LIKE "%"+arrOne._+"%")',[arrTwo, arrOne]);
 

document.getElementById("res").textContent = JSON.stringify(res);