title: How to check a JSON Array contains different/multiple key - value pairs
body: <p>I have a JSON Array and want to realize a filter engine and i try do find a solution to get all these entries with a special key:value pair and push it into a sep array.</p>
  
  <p>The JSON looks like this:</p>
  
  <pre><code>var sample = {
      "response": {
          "things": [{
              "index": 0,
              "type": 1,
              "img":2
          },{
              "index": 1,
              "type": 0,
              "img":1
          },{
              "index": 2,
              "type": 1,
              "img":1
          }]
      }
  };
  </code></pre>
  
  <p>Example HTML:</p>
  
  <pre><code>&lt;select name="type"&gt;
  &lt;option value="0"&gt;one&lt;/option&gt;
  &lt;option value="1"&gt;two&lt;/option&gt;
  ...
  &lt;/select&gt;
  </code></pre>
  
  <p>currently i have made a well running solution to filter only with one key and value, that is not the point. The problem is to take the object: Object:{param:1,param:2,param:3,param:n} and find all entries with exactly these filter pairs.</p>
  
  <p>i doesnt found a correct way to handle it with multiple or how to use here, so i hope someone can help please.</p>
  
  <pre><code>        var uri =['http://example.com?type=1&amp;img=0'];
  
          for (var i = 0, len = uri.length; i &lt; len; i++) {
              var result = this.qwertzSplit(uri[i]);
          }
          testing(result);
  //qwertzSplit contains the Object: Object{type="1",img="0"}
      function testing(result){
          var obj = this.sample,indexes = [];
  
          for (result in obj) {
              if (obj.hasOwnProperty(result)) {
                  indexes.push(result);
              }
          }
         console.log(indexes);
  }
  </code></pre>
  
  <p>So in my case the solution from kolink and my current doenst work as well as i need it. And i also cant find correct way with JS to solve it. My question here isnt duplicate because the posted links handle the single way, not a multiple way.</p>
  
  <p>So i must find a way to get all entries with the given key/value pairs which take out the URI</p>