title: jQuery-UI - Autocomplete giving me weird results
body: <p>I am using jQuery's autocomplete and its giving me weird results.
  I am trying to get the results of either the first or last name. Right now if I start typing I only get by last name. Sometimes I get only by first name. Is there a way to do this by both first and last name?</p>
  <pre class="lang-js prettyprint-override"><code>$('#userAutoComplete').autocomplete({
    minLength: 2,
    source: function(request, response) {
      response($.map(sourceValues, function(value, key) {
        var name = value.firstName + &quot; &quot; + value.lastName;
        name = name.toLowerCase();
        console.log(request.term);
  
        if (name.indexOf(request.term.toLowerCase()) != -1) {
          return {
            label: value.firstName + &quot; &quot; + value.lastName,
            value: value.userId
          }
        } else {
          return null;
        }
      }));
    },
    select: function(event, ui) {
      event.preventDefault();
      $('#userAutoComplete').val(ui.item.label);
      $('#specificUserId').val(ui.item.value);
    }
  });
  </code></pre>
  <p>Here is a sample of what sourceValues is:</p>
  <pre><code>({userId: 1, firstName: &quot;Bob&quot; lastName: &quot;Smith&quot;}, {userId: 2, firstName: &quot;Mike&quot; lastName: &quot;Garcia&quot;}, {userId: 3, firstName: &quot;Bob&quot; lastName: &quot;Garcia&quot;}, {userId: 4, firstName: &quot;Mike&quot; lastName: &quot;Smith&quot;})
  </code></pre>