title: How to check if the id exists in the array of ids javascript
body: <p>I have an object like:</p>
  
  <pre><code>item: {
      b: null
      c: "asd"
      i: 10
      q: 10
      s: Array [237,241]}
  </code></pre>
  
  <p>Also I have an array of ids:</p>
  
  <pre><code>var ids = [237, 238, 239, 240, 242, 243...]
  </code></pre>
  
  <p>I dont know how to check if above ids exist in s, and then
  save those items to new array or object</p>
  
  <pre><code>        for (var key in items) {
              for (var i in items[key].s) {
          //...
              }
          }
  </code></pre>