title: KnockoutJS - Linking value from a input to a datalist value
body: <p>I'm generating a <code>datalist</code> options based on a ko observable.</p>
  
  <pre><code>function Company(company) {
      this.id = company.Id;
      this.name = company.Name;
      this.state = company.State.name;
  }
  
  
  var self = this;
  self.companies = ko.observable();
  $.get('...', {}, function(result) {
  
      ko.utils.arrayForEach(result, function(company) {
          self.companies.push(new Company(ko.toJS(company)));
      });
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="text" data-bind="value: selectedCompany" list="companiesList" /&gt;
  &lt;datalist id="companiesList" data-bind="foreach: companies"&gt;
      &lt;option data-bind="value: name, text: state"&gt;&lt;/option&gt;
  &lt;/datalist&gt;
  </code></pre>
  
  <p>Ok, here's the deal: in the <code>Company</code> function, I store the Id from that company. What I want to do? Something that able me to link the Id value to selectedCompany variable instead the name? I want to display the name property, but I need to store the Id.</p>
  
  <p>Is there a way to do this?
  Thank you all!</p>