title: Use html input data field attribute on bootstrap typeahead
body: <p>I'm trying to get a data-field attribute to select what field of my "objects.json" will be used as source of my Bootstrap Typeahead input text, like:</p>
  
  <p>form.html</p>
  
  <pre><code>&lt;input type="text" data-provide="typeahead" data-field="name"&gt;
  </code></pre>
  
  <p>form.js</p>
  
  <pre><code>$("[data-provide=typeahead]").typeahead({
    source: function(query, process) {
      return $.get("/objects.json", {
        query: query
      }, function(data) {
        return process($.map(data, function(o) {
          return o[$(this).data('field')];
        }));
      });
    }
  });
  </code></pre>
  
  <p>objects.json</p>
  
  <pre><code>[{"id":1,"name":"lorem"},
   {"id":2,"name":"ipsum"},
   {"id":3,"name":"dolor"}]
  </code></pre>
  
  <p>The problem is the "$(this).data('field')" on Javascript isn't get the HTML data-field attribute.</p>
  
  <p><em>Thanks in advance!</em></p>