dist/js/materializecss-autocomplete.js
function convertArrayToObject(array) {
      var temp = [];
      array.forEach(function (text) {
        temp.push({
          index: text
        });
      });
      return temp;
    }
function convertArrayToObject(array) {
      var temp = [];
      array.forEach(function (text) {
        temp.push({
          index: text
        });
      });
      return temp;
    }
function convertArrayToObject ( array ) { var temp = [ ] ; array . forEach ( function ( text ) { temp . push ( { index : text } ) ; } ) ; return temp ; }
This function converts an array of strings to object of strings with key "index"
@param array
@returns {Array}
This function converts an array of strings to object of strings with key index