title: Javascript Object to filter json Array
body: <p>I've got multiple checkboxes in an HTML form. When I click on a button, the checked values are put into an JavaScript object and a filter function is triggered.</p>
  
  <pre><code>this.filterChkbx.on('click', function() {
      _this.checkedFilter.push({
          filterEl: this.value
      });
  });
  </code></pre>
  
  <p>In the filter function I'm pulling a json file.</p>
  
  <pre><code>$.ajax("ajax/search-test-data.json")
  .done(function (data){
      ...
  </code></pre>
  
  <p>Now I want to show the objects matching the values from the form. That´s what my json looks like:</p>
  
  <pre><code>{
  "searchtest" : [
    {
      "id" : "001",
      "section": "Hochschule",
      "group": "Professoren",
      "location": "Kaiserslautern",
      "date": "HS 2015/11",
      "description" : "Lorem ipsum dolor sit amet",
      "details" : "VZ",
      "deadline" : "27.12.2015",
      "topic" : "Lorem"
    },
  
    {
      "id" : "002",
  </code></pre>
  
  <p>And this is my form:</p>
  
  <pre><code>&lt;form class="filterThisResults" action="ajax/search-test-data.json" method="GET"&gt;
  
      &lt;ul class="filter-list"&gt;
          &lt;button type="reset"&gt;Filter löschen&lt;/button&gt;
  
          &lt;div class="search-filter-section"&gt;
              &lt;li&gt;
                  &lt;h2&gt;Bereich&lt;/h2&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="Hochschule"&gt;
                  &lt;label for="check1"&gt;Hochschule&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="Angewandte Ingenierwissenschaften"&gt;
                  &lt;label for="check2"&gt;Angewandte Ingenierwissenschaften&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="Bauen &amp; Gestalten"&gt;
                  &lt;label for="check3"&gt;Bauen &amp; Gestalten&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="BWL"&gt;
                  &lt;label for="check4"&gt;BWL&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="Informatik"&gt;
                  &lt;label for="check5"&gt;Informatik&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="section" value="Logistik"&gt;
                  &lt;label for="check6"&gt;Logistik&lt;/label&gt;
              &lt;/li&gt;
          &lt;/div&gt;
  
          &lt;div class="search-filter-group"&gt;
              &lt;li&gt;
                  &lt;h2&gt;Gruppen&lt;/h2&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="group" value="Professoren"&gt;
                  &lt;label for="check1"&gt;Professoren&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="group" value="Studenten"&gt;
                  &lt;label for="check2"&gt;Studenten&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="group" value="Angestellte"&gt;
                  &lt;label for="check3"&gt;Angestellte&lt;/label&gt;
              &lt;/li&gt;
          &lt;/div&gt;
  
          &lt;div class="search-filter-location"&gt;
              &lt;li&gt;
                  &lt;h2&gt;Standort&lt;/h2&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="location" value="Kaiserslautern"&gt;
                  &lt;label for="check1"&gt;Kaiserslautern&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="location" value="Pirmasens"&gt;
                  &lt;label for="check2"&gt;Pirmasens&lt;/label&gt;
              &lt;/li&gt;
  
              &lt;li&gt;
                  &lt;input class="filterCheckbx" type="checkbox" name="location" value="Zweibrücken"&gt;
                  &lt;label for="check3"&gt;Zweibrücken&lt;/label&gt;
              &lt;/li&gt;
          &lt;/div&gt;
  
          &lt;div class="search-filter-topic"&gt;
              &lt;li&gt;
                  &lt;h2&gt;Thema&lt;/h2&gt;
              &lt;/li&gt;
  
              &lt;li&gt;    
                  &lt;select class="filterCheckbx" id="topic" name="topic" size="3"&gt;
                      &lt;option value="Lorem"&gt;Lorem&lt;/option&gt;
                      &lt;option value="Ipsum"&gt;Ipsum&lt;/option&gt;
                      &lt;option value="Dolor"&gt;Dolor&lt;/option&gt;
                  &lt;/select&gt;   
              &lt;/li&gt;
          &lt;/div&gt;
  
          &lt;li&gt;
              &lt;button class="submit-filter" type="submit"&gt;Ergebnisse anzeigen&lt;/button&gt;
          &lt;li&gt;
      &lt;/ul&gt;   
  &lt;/form&gt;
  </code></pre>
  
  <p>What´s the way to go through the json and check which items are true. When more than one item in a form-section is selected, the results are enlarged.    </p>