title: Search an array return partial matches
body: <p>I need to search an associative array's values for a string, but only the beginning of the string example:</p>
  
  <pre><code>var stack = ['aba', 'abcd', 'ab', 'da', 'da'];
  </code></pre>
  
  <p>a search on stack for the value <code>a</code> would return <code>['abc, 'abcd', 'ab']</code>, and for <code>b</code> would just return b while a search for 'd' would return <code>[da', 'da']</code> ...any way to do that?</p>
  
  <p>Im trying to do like an autocomplete select box, but its custom so i need to moditor text events and search my array of items to get the index of the first match while the user is typing.</p>