how to search in json data using jquery
<p>I want to search in json data on every keyup.</p>

<p><strong>Json:</strong></p>

<pre><code>{
 "AB01": {
   "foo": "bar",
   "ID": "A1",
   "PID": "Z09",
    },
  "AB10": {
    "foo10": "bar10",
    "ID": "B10",
    "PID": "Y08",
   },
}
</code></pre>

<p><strong>jQuery</strong></p>

<pre><code>$('input').on('keyup', function(){
  $.getJSON("ABc.json", function(data) {
    var InputVal = $('input').val();
    var myExp = new RegExp(InputVal, "i");

    var results = [];

    $.each(data, function(key, obj){
        if (obj.foo.search(new RegExp(InputVal,"i")) != -1) {
            results.push(obj);
        }       
    });

    for(var i=0; i&lt; $(results).length; i++)
    {
     console.log(JSON.stringify(results[i])); 
    }
  });
});
</code></pre>

<p><strong>Html:</strong></p>

<pre><code>&lt;input type="text" name="abc"&gt;
</code></pre>

<p><br>Now i want that the <code>input string\char</code> <code>on every keyup</code> match data in json not with <code>foo</code> or <code>ID</code> but with all key and value.</p>

<p><br>I can't find how to solve this, any help appreciated.
<br>If any thing you want from my side let me know :)</p>

<p><br>Thanks in advance.</p>