title: Get value from materialize autocomplete with chips
body: <p>Please help me, I want to get data from MaterializeCSS chips selected, but I don't know, how.
  I want value form input (type:hidden) contains id data from chips.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var my_data = {
    "0":"Apple",
    "1":"Microsoft",
    "2":"Google"
  }
  
  var myConvertedData = {};
  $.each(my_data, function(index, value) {
    myConvertedData[value] = null;
  });
  $('.chips-autocomplete').material_chip({
    autocompleteData: myConvertedData
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"&gt;&lt;/script&gt;
  
  &lt;div class="row"&gt;
    &lt;div class=" col s12"&gt;
    &lt;form method="POST" action="#"&gt;
      &lt;div class="chips chips-autocomplete" id="optionS"&gt;&lt;/div&gt;
      &lt;input class="browser-default" type="text" name="val_selected" placeholder="form hidden for get item selected #options"&gt;
      &lt;button type="submit" class="btn btn-large" disabled&gt;Save
      &lt;/button&gt;
    &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>This is my code : <a href="https://jsfiddle.net/riza24/xznnkgww/2/" rel="nofollow noreferrer"><strong>Fiddle</strong></a></p>