title: Load multidimensional JSON array of objects into selectize.js
body: <p>I want to load this JSON into selectize:</p>
  
  <pre><code>{"platforms":
  
  [{"id":32,"name":"Sega Saturn","slug":"saturn"},
  
  {"id":14,"name":"Mac","slug":"mac"},
  
  {"id":47,"name":"Virtual Console (Nintendo)","slug":"vc"},
  
  {"id":34,"name":"Android","slug":"android"},
  
  {"id":84,"name":"SG-1000","slug":"sg1000"},
  
  {"id":58,"name":"Super Famicom","slug":"sfam"},
  
  {"id":82,"name":"Web browser","slug":"browser"}]
  
  }
  </code></pre>
  
  <p>I would like it to operate very similar to <a href="https://github.com/brianreavis/selectize.js/blob/master/examples/api.html" rel="nofollow noreferrer">this example provided by the Selectize.js developers</a> (excluding the URL portion in each), except obviously instead of the pre-made ID's and names using my json data.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Code I'm currently trying to use: </p>
  
  <pre><code>options: [
      for (var i = 0; i &lt; platforms.platforms.length; i++) 
      {
          var counter = platforms.platforms[i];
          {id: counter.id, title: counter.name},
          console.log(counter.name);
      }
  </code></pre>
  
  <p>Here's what the JSON looks like when logging it in the console: </p>
  
  <p><a href="https://i.stack.imgur.com/uMKM8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uMKM8.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/JQGkn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JQGkn.png" alt="enter image description here"></a></p>
  
  <p><strong>EDIT:</strong> <a href="https://github.com/brianreavis/selectize.js/blob/master/examples/movies.html" rel="nofollow noreferrer">This is another example that I'm looking at as it uses JSON.</a></p>