title: select obsservableArray record from table in knockout
body: <p>trying to figure out how to set up the radio button bindings in a table in knockout.  I would like when the radio button on the table is selected. the entire selected record is available in the model.  not quite sure how to set up the binding on the radio input. I assume I need to use $parent and a function for the value binding?</p>
  
  <p>here is the fiddle. (the selected record does not do anything right now I would like it to be populated when the radio button is selected)</p>
  
  <p><a href="https://jsfiddle.net/othkss9s/5/" rel="nofollow">https://jsfiddle.net/othkss9s/5/</a></p>
  
  <p>HTML</p>
  
  <pre><code>&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
    &lt;th&gt;Select&lt;/th&gt;
      &lt;th&gt;First&lt;/th&gt;
      &lt;th&gt;Last&lt;/th&gt;
      &lt;th&gt;Dept&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody data-bind='foreach: employees'&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;input type="radio" name="employees"&gt;&lt;/td&gt;
        &lt;td data-bind='text: first'&gt;&lt;/td&gt;
        &lt;td data-bind='text: last'&gt;&lt;/td&gt;
        &lt;td data-bind='text: dept'&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;div data-bind="with: selectedRow"&gt;
  &lt;h2&gt;
    Selected Record
    &lt;/h2&gt;
   &lt;p&gt;
      First:  &lt;span data-bind="first" &gt;&lt;/span&gt;
   &lt;/p&gt; 
   &lt;p&gt;
    Last:  &lt;span data-bind="last" &gt;&lt;/span&gt;
   &lt;/p&gt; 
   &lt;p&gt;
    Dept:  &lt;span data-bind="dept" &gt;&lt;/span&gt;
   &lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>function employee(first, last, dept) {
    this.first = ko.observable(first);
    this.last = ko.observable(last);
    this.dept = ko.observable(dept);
  }
  
  function model() {
    var self = this;
    this.employees = ko.observableArray("");
    this.selectedRow = ko.observable({});
  
  };
  
  var myViewModel = new model();
  
  $(document).ready(function() {
    ko.applyBindings(myViewModel);
    myViewModel.employees.push(
       new employee("Bob","Jones", "Hr")
    );
    myViewModel.employees.push(
       new employee("Sarah","Smith", "It")
    );
     myViewModel.employees.push(
       new employee("John","Miller", "It")
    );
  
  
  });
  </code></pre>