How to set select value in select2 plugin - jquery
<p>I use this code for insert data to <code>select</code> element with <code>select2</code> plugin:</p>

<pre><code>$.ajax({
    type: "POST",
    url: "ws.asmx/GetEvrakGrup",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (dc, status) {
        jsonData = JSON.parse(dc.d);
        $("#selectId").select2({
            data: jsonData
        });

    },
    error: function () { alert("This is an Error");}
});
</code></pre>

<p>After I want to set a value in this select but its not working:</p>

<pre><code>$("#selectId").val(81);
</code></pre>