title: Unable to retrieve the value of Dynamic Select box
body: <p>I created a button that will retrieve the value of two select boxes. I can get the value of <code>$("#parent_selection_pbrand").val(value.CellphoneBrand);</code> but <code>$("#child_selection_pmodel").val(value.CellphoneModel);</code> doesn't show the value on the select box. Any help on this is highly appreciated. Thanks in advance.</p>
  
  <pre><code>function retrieveListItems() {
  var title = $("#txtTitle").val();
  var siteUrl = _spPageContextInfo.webAbsoluteUrl;
  var fullUrl = siteUrl + "/_api/web/lists/GetByTitle('ComputerEquipment')  /items?"+
      "$select=Id,Title,Department,Location,CellphoneBrand,CellphoneModell,CellphoneIMEI&amp;$filter=(Title eq '"+title+"')";
  
  $.ajax({
      url: fullUrl,
      type: "GET",
      headers: {
          "accept": "application/json;odata=verbose",
          "content-type": "application/json;odata=verbose",
      },
      success: onQuerySucceeded,
  
  });
  
          function onQuerySucceeded(data) {
              var listItemInfo = '';
           $.each(data.d.results, function (key, value) {
          $("#parent_selection_pbrand").val(value.CellphoneBrand);
          $("#child_selection_pmodel").val(value.CellphoneModel);}
  </code></pre>
  
  <p>HTML code</p>
  
  <pre><code>&lt;strong&gt;Brand:&lt;/strong&gt;
          &lt;div class="wrapper"&gt;
                  &lt;select name="parent_selection_pbrand" id="parent_selection_pbrand"&gt;
                      &lt;option value=""&gt;--Please Select--&lt;/option&gt;
                      &lt;option value="Apple"&gt;Apple&lt;/option&gt;
                      &lt;option value="Samsung"&gt;Samsung&lt;/option&gt;
                  &lt;/select&gt;
  &lt;select name="child_selection_pmodel" id="child_selection_pmodel"&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>var Apple = [
                  {display: "iPhone5", value: "iPhone5" }, 
                  {display: "iPhone6", value: "iPhone6" }]; 
  
  var Samsung = [
                  {display: "Samsung S5", value: "Samsung S5" }, 
                  {display: "Samsung S6", value: "Samsung S6" }]; 
  
              //If parent option is changed
              $("#parent_selection_pbrand").change(function() {
                      var parent = $(this).val(); //get option value from parent 
  
                      switch(parent){ //using switch compare selected option and populate child
                            case 'Apple':
                              listphone(Apple);
                              break;
                            case 'Samsung':
                              listphone(Samsung);
                              break;              
                          default: //default child option is blank
                              $("#child_selection_pmodel").html('');  
                              break;
                         }
              });
  
              //function to populate child select box
              function listphone(array_list)
              {
                  $("#child_selection_pmodel").html(""); //reset child options
                  $(array_list).each(function (i) { //populate child options 
                      $("#child_selection_pmodel").append("&lt;option value=\""+array_list[i].value+"\"&gt;"+array_list[i].display+"&lt;/option&gt;");
  
                  });
                  }
  </code></pre>