title: I'm trying to match datatable value to combobox to edit data
body: <p>I want to edit my datatable value using modals, so it won't have to change the page. I can get the datatable value that I'm looking for, but I have trouble to make my edit form which have combobox value that should be selected with previous data. Can anyone help me with this trouble? Because I'm still newbie in javascript things.</p>
  <p>This is what my html look a like.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var elements = document.getElementsByName('jo');
  console.log(elements.length);
  for (i=0;i&lt;elements.length;i++) {
    if (elements[i].text == data[1]) {
      console.log(elements[i]);
      elements[i].change();
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select id="nj" class="bootstrap-select" name="no_jo" data-live-search="true" data-width="100%"&gt;
    &lt;option name="jo" value="1"&gt; 190001&lt;/option&gt;
    &lt;option name="jo" value="2"&gt; 190002&lt;/option&gt;
    &lt;option name="jo" value="4"&gt; 190003&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>