how can make the slect element and append options?
<p>I am simply trying to make a selector component with some of the options, i am not get any result it this. really some thing wrong the way what i do.</p>

<p>any one can help me in this?</p>

<pre><code>var object = {
               "id":"countries",
               "label":"Country",
               "name":"countries",
               "type":"select",
               "options":[
                  {
                     "value":"",
                     "text":"Select Country"
                  },
                  {
                     "value":"in",
                     "text":"India",
                      "selected":"true"
                  },
                  {
                     "value":"us",
                     "text":"United Stated"

                  },
                  {
                     "value":"uk",
                     "text":"United Kingdom"
                  },
                  {
                     "value":"cn",
                     "text":"Canada"
                  }
               ]
};
var select = "";

var mapInfo = function (element,info) {
    $.map(info, function(val,num){
console.log(val);        
    })
}

var generateSelector = function (info){

    select +='&lt;select'+info.id+'&gt;&lt;/select&gt;'
    select +=mapInfo(select,info.options)

   $('body').append(select);

}(object);
</code></pre>

<p><a href="http://jsfiddle.net/vYeFS/2/" rel="nofollow">jsfiddle here</a></p>
