title: Uncaught TypeError: b.toLowerCase is not a function
body: <p>I am fetching some records :</p>
  
  <pre><code>$companies = \App\User::where('type', 'pet-salon')-&gt;orWhere('type', 'veterinarian')-&gt;get();
  return response()-&gt;json($companies);
  </code></pre>
  
  <p>The data coming back is an array of objects:</p>
  
  <pre><code>[{
    id: 2, 
    type: "xxx", 
    deactivate: 0, 
    xxx: "Hello", 
    middle_name: "Mid",   
    lastname: "xxx",
    //...
  }]
  </code></pre>
  
  <p>This is the jQuery typeahead code:</p>
  
  <pre><code>$('#getCompaniesForConnection').typeahead({
    source:  function (query, process) {
      return $.get('/all/companies', { query: query }, function (data) {
        return process(data);
      });
    }
  });
  </code></pre>
  
  <p>The exception its giving me :</p>
  
  <blockquote>
    <p>Uncaught TypeError: b.toLowerCase is not a function</p>
  </blockquote>
  
  <p>And the results drop-down is not showing too, What am i missing here ?</p>