title: Selected value in Select statement using 'options' in knockout js
body: <p>I'm trying to submit a form using Knockout JS as, that data is passed as json. Here I'm having a problem. The following is my KO model.</p>
  <pre><code>var permissionRequestModel = {
  
  fromDate: ko.observable(''),
  toDate: ko.observable(''),
  checkFullDay: ko.observable(false),
  
  fromTimeHH: ko.observable(''),
  fromTimeMM: ko.observable(''),
  toTimeHH: ko.observable(''),
  toTimeMM: ko.observable(''),
  
  permissionTypeOne: ko.observable(''),
  permissionTypeTwo: ko.observable(''),
  
  approverList: ko.observableArray([]),
  
  reasonLeave: ko.observable('')
  
  };
  </code></pre>
  <p>Now in this approverList is being populated by an Array taken from a retrieved json object, its populted as follows</p>
  <pre><code>$(function () {
  $.getJSON(&quot;http://ec20032432.compute-1.amazonaws.com/api/Request/permission?appid=1&amp;opertype=get_approver_list&quot;, function (data) { permissionRequestModel.approverList(data.Approvers); })
  });
  </code></pre>
  <p>the retrived data.Approvers will be of the form:</p>
  <pre><code>&quot;Approvers&quot;:
  [{&quot;ID&quot;:&quot;asdasd&quot;,
   &quot;Display_Name&quot;:&quot;Jason asdasd&quot;}]
  </code></pre>
  <p>I need the text of the dropdown list to be the 'Display_Name' and Value to be 'ID', so I use the following markup to do it:</p>
  <pre><code> &lt;select name=&quot;approverList&quot; id=&quot;approverList&quot; data-native-menu=&quot;true&quot; class=&quot;required&quot; data-bind=&quot;options: approverList, optionsCaption: 'Select Your Approver', optionsText: 'Display_Name', optionsValue:'ID'&quot;&gt;
                      &lt;/select&gt;    
  </code></pre>
  <p>So far its fine, but now when I submit the form using the following code, the approverList us being passed as an object instead of the selected value (ie the ID):</p>
  <pre><code>permissionRequestModel.requestPermission = function () {
  if ($(&quot;#permissionRequestForm&quot;).valid()) {
      $.ajax({
          url: &quot;http://eertretetrer.compute-1.amazonaws.com/api/Request/permission?appid=1&amp;opertype=requestor&quot;,
          type: &quot;POST&quot;,
          data: ko.toJSON(permissionRequestModel),
          processData:false,
          contentType: &quot;application/json&quot;,
          dataType:&quot;json&quot;,
          success: function (result) {
              alert(&quot;Success&quot;);
          },
          error: function (result) {
              alert(result.responseText);
          }
       });
  }
  else {
  }
  };
  </code></pre>
  <p>Does anybody know why this is happening? How do I send the value instead (of ID)?</p>