title: Convert text input to lowercase - Javascript
body: <p>Having trouble creating a case insensitive search in my Ionic app.  I have the following that pushes tags into firebase.  How can I convert the entire array to lowercase before going into the database?</p>
  
  <pre class="lang-js prettyprint-override"><code>$scope.addToTag = function(tag) {
    if ($scope.productTags.indexOf(tag) == -1)
      $scope.productTags.push(tag);
  
    $scope.productTags[tag] = true;
  
    var productTags = {};
    var addToTag = function(tag) {
      productTags[tag] = true;
    };
  };
  </code></pre>
  
  <p>Thanks in advance!</p>