title: proper data type for typeahead.js (Bloodhound)?
body: <p>I want to use <a href="https://github.com/twitter/typeahead.js" rel="nofollow">typeahead.js</a>  but i cant implement it via asp.net mvc.</p>
  
  <p>here is JS code:</p>
  
  <pre><code>var $SelectedSuggestion = $('#selectedCompany').hide(),
          movies = new Bloodhound({
              datumTokenizer: function (datum) {
                  return Bloodhound.tokenizers.whitespace(datum.title);
              },
              queryTokenizer: Bloodhound.tokenizers.whitespace,
              remote: {
                  url: '/Home/getTags',
                  filter: function (movies) {
                      return movies.results;
                  }
              }
          });
  
      // Initialize the Bloodhound suggestion engine
      movies.initialize();
  
      // Instantiate the Typeahead UI
      $('#inputTags').typeahead(null, {
          displayKey: 'title',
          source: movies.ttAdapter()
      })
          .on("typeahead:selected", function (obj, selectedItem) {
              $SelectedSuggestion.html("Selected Suggestion Item: " + JSON.stringify(selectedItem)).show();
          });
  </code></pre>
  
  <p>asp mvc controller:</p>
  
  <pre><code>  [RequireHttps]
      public ActionResult getTags()
      {
          Tag tg = new Tag();
          return Json(tg.getSTags());
      }
  </code></pre>
  
  <p>and this my function for select data:</p>
  
  <pre><code> public Array getSTags()
      {
          TimaitEntities database = new TimaitEntities();
          var db = database;
          return (from x in db.superTag select x.name).ToArray();
      }
  </code></pre>
  
  <p>My question is what's proper data type for <code>getSTags()</code> and my controller is correct or not?</p>
  
  <p>Also see this line in JS:</p>
  
  <pre><code>   url: '/Home/getTags',
  </code></pre>