title: How to grep the JSON array contains in JavaScript or jQuery
body: <p>Consider:</p>
  <pre><code>   var dummyArray =  [{
          &quot;fname&quot;: &quot;gali&quot;,
          &quot;lname&quot;: &quot;doe&quot;
      }, {
          &quot;fname&quot;: &quot;john&quot;,
          &quot;lname&quot;: &quot;danny&quot;
      }, {
          &quot;fname&quot;: &quot;joe&quot;,
          &quot;lname&quot;: &quot;dawns&quot;
      }, {
          &quot;fname&quot;: &quot;liji&quot;,
          &quot;lname&quot;: &quot;hawk&quot;
      }]
  
  dummyArray = j$.grep(dummyArray, function(dt) {
               return (dt.fname== 'j');
  });
  </code></pre>
  <p>How can I query the &quot;fname&quot; which contains letter &quot;j&quot; using the <a href="https://api.jquery.com/jQuery.grep/" rel="nofollow noreferrer">grep</a> function?</p>