title: show table row if id is in an array with jQuery
body: <p>I have the following problem, that I don't know how to solve this.</p>
  
  <p>I have a dropdown menu and a table and if one item of the dropdown is selected the table should only show the elements which are in this group.</p>
  
  <p>the data came from an external service and will be refreshed every minute by calling <code>vehicleShowHide();</code> and <code>refreshTable();</code> (get the table data and creates the table).</p>
  
  <p>I create an array with the ids and now I want to compare the ids in the array with the ids in table to show only the result and hide the others.</p>
  
  <p>dropdown:</p>
  
  <pre><code>&lt;select class="custom-select custom-select-sm" onchange="showVehicleGroup(value)"&gt;
      &lt;option value="" selected=""&gt;Alle Gorups&lt;/option&gt;
      &lt;option value="1-44060-041414BE3"&gt;Alle Vehicle (101)&lt;/option&gt;
      &lt;option value="1-44060-5211861A0"&gt;Group1 (42)&lt;/option&gt;
      &lt;option value="1-44060-477E11472"&gt;Group2 (3)&lt;/option&gt;
      &lt;option value="1-44060-4774E43D7"&gt;Group4 (23)&lt;/option&gt;
      &lt;option value="1-44060-288B143F2"&gt;Group5 (3)&lt;/option&gt;
      &lt;option value="1-44060-730090EA1"&gt;Group6 (6)&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>the table (simpified):</p>
  
  <pre><code>&lt;table id="vehicleTable" class="table table-hover table-sm"&gt;
  &lt;thead&gt;
  &lt;/thead&gt;
    &lt;tbody id="vehicleTableBody"&gt;
        &lt;tr id="102"&gt;
            &lt;td&gt;Text&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr id="103"&gt;
            &lt;td&gt;Text&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr id="104"&gt;
            &lt;td&gt;Text&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr id="105"&gt;
            &lt;td&gt;Text&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr id="106"&gt;
            &lt;td&gt;Text&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>function showVehicleGroup(value) {
  
  if (groupFilterArray.length === 0) {
      // do nothing
  } else {
      groupFilterArray = [];
  }
  
  $(vehicleObjectsArray).each(function(key, element) {
  
      if (element.objectgroupuid === value) {
  
          groupFilterObject = element.objectno
  
          groupFilterArray.push(groupFilterObject);
  
      } else {
          // do nothing
      }
  });
  
  vehicleShowHide();
  }
  
  function vehicleShowHide() {
  
  groupFilterArray = [ "103", "105", "106" ];
  
  $('#vehicleTable').each(function() {
  
   // here I do not know how to compare the groupFilterArray with the table rows by id
      if () {
          $('#vehicleTable tbody tr#id').show();
      } else {
          $('#vehicleTable tbody tr').hide();
      }
  
  });
  </code></pre>
  
  <p>external json (extraction):</p>
  
  <pre><code>[
   {
    "objectgroupname": "Group1",
    "objectno": "102",
    "objectname": "xxxxx",
    "objectuid": "1-44060-53078611D",
    "objectgroupuid": "1-44060-041414BE3"
   },
   {
    "objectgroupname": "Group2",
    "objectno": "103",
    "objectname": "xxxxx",
    "objectuid": "1-44060-3236707EF",
    "objectgroupuid": "1-44060-477E11472"
   }
  ]
  </code></pre>