title: Uncaught TypeError: Object
body: <p>I want to search two item (name=string and location=json). this search is (one input box and two columns for search).
  at the moment with this code I can find 'name' but i need I need to find location also.</p>
  
  <pre><code>if(textToCheck !== '') {                                
              if((searchArray[i]['location']).toLowerCase().search(textToCheck) === -1) {
                  display = false;
              }
          }   
  </code></pre>
  
  <p>the code that I suggest and doesn't work is:</p>
  
  <pre><code>if(textToCheck !== '') {                                
              if((searchArray[i]['name']).toLowerCase().search(textToCheck) === -1 || (searchArray[i]['location']).toLowerCase().search(textToCheck) === -1) {
                  display = false;
              }
          }   
  </code></pre>
  
  <p>error is :</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object 123 Street,xxx,xx,Canada,123rd Street,xxx,xx,123 xxx,12345 xxx,France has no method 'toLowerCase' FilterController.showFilteredSet (anonymous function)</p>
  </blockquote>