title: Filter JSON object with Array of selected checkbox
body: <p>How i can filter my JSON object with array.</p>
  
  <p><a href="https://jsfiddle.net/armanfeyzi/ss16sn19/" rel="nofollow noreferrer">FIDDLE</a></p>
  
  <p>This is an sample of my json object and code, i want to filter final render HTML by selected checkbox.</p>
  
  <p>Thanks for your help</p>
  
  <pre><code>function init(arr){
    var li = '';
    $.each(jsn, function (key, value) {
  
      if (arr.length == 0) {
        li += '&lt;li&gt;' + jsn[key].name + '&lt;/li&gt;';
      }else{
        $(arr).each(function (i, v) {
        // this section must be filter "pack's" but i can't writ correct query
          li += '&lt;li&gt;' + jsn[key].name + '&lt;/li&gt;';
        });
      };
      $('#container').html(li);
    })
  }
  var CheckArr = new Array();
  init(CheckArr);
  
  $('#btnFilter').click(function(){
      var CheckArr = new Array();
    $('input[type=checkbox]').each(function () {
      if ($(this).is(':checked')) {
        CheckArr.push($(this).attr('value'))
      }
    });
    init(CheckArr);
  </code></pre>