title: Searching array of objects using jquery grep with wildcards
body: <p>I'm searching an array of objects using jquery grep and would like to include wildcards in the search. For example, I have an array as follows: </p>
  
  <pre><code>courses = [
  {code: 'ENCH3TH', otherFields: otherStuff},
  {code: 'ENCH3THHS1', otherFields: otherStuff},
  {code: 'ENCH3TH2', otherFields: otherStuff},
  {code: 'ENCH4RT', otherFields: otherStuff},
  {code: 'ENCH4MT', otherFields: otherStuff}]
  </code></pre>
  
  <p>I'd like to get all the courses with the ENCH3TH prefix. I have attempted</p>
  
  <pre><code>var resultSet = $.grep(courses, function(e){ return e.code == 'ENCH3TH/'; });
  </code></pre>
  
  <p>..to no avail (note the use of the '/' after 'ENCH3TH' as the wildcard).</p>