title: how do i place a list of strings into dropdown menu
body: <p>I am trying to place the list of string which i am getting from my database into drop-down menu. i have try using array but it shows me an error of [[object Object, object Object]...]. This is my ajax method </p>
  
  <pre><code>$(document).ready(function () {
          Method(); });
  
  function Method() {
          ajReq.abort();
          ajReq = $.ajax({
              type: "POST",
              url: "Services/Page.asmx/GetService",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (x) {
                    var opts = '';
                  $.each(x, function (i) {
                      opts += '&lt;option&gt;' + this + '&lt;/option&gt;';
                  });
                  $('.dropdown-menu').html(opts);
               }
          });
      }
  </code></pre>
  
  <blockquote>
    <p>this is my drop down menu:</p>
  </blockquote>
  
  <pre><code> &lt;div class="fromDropdownMenu" style="display: inline-block;"&gt;
          &lt;div class="btn-group"&gt;
              &lt;button type="button" id="Button1" class="btn btn-default dropdown-toggle" data-toggle="dropdown"&gt;
                  &lt;span id="dropdown_title"&gt;Name:&lt;/span&gt;&lt;span class="caret"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;ul class="dropdown-menu"&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>currently if i place a breakpoint to $.each(x, function (i)  and hoverover x i get [[object Object], [object, Object]...]. If i then click on + sign i get my data from the database. </p>
  
  <p>But when the breakpoint hits opts += '' + this + ''; and if i hoverover  i get same message as [[object Object], [object, Object]...] if i then click on + sign i get Children could not be evaluated. Same message shows. Can someone help me here?  </p>
  
  <p>This is what my x is: </p>
  
  <pre><code>     -      x   {...}   Object
  -       d   [[object Object],[object Object],[object Object],[object Object]]           Object, (Array)
  -       [0] {...}   Object
  +       __type  "MakeBooking"   String
      MakeBookingID   0   Number
  +       Name    "Jhon"  String
  +       [1] {...}   Object
  +       [2] {...}   Object
  +       [3] {...}   Object
  +       arguments   {...}   Object, (Arguments)
      opts    ""  String
  </code></pre>
  
  <p>This is onselect function: </p>
  
  <pre><code> $('.dropdown-menu li').on('click', function () {
              $('#dropdown_title').html($(this).find('a').html());
          });
  </code></pre>