jQuery: Ajax Sorting JSON
<p>For some reason, I'm having problems sorting an AJAX Request. </p>

<p>First, Here is my controller data (this returns sorted):</p>

<pre><code>public function get_agents() {
    $this-&gt;autoRender = false;

    $this-&gt;Agent-&gt;contain();
    $agents = $this-&gt;Agent-&gt;find('list', array('conditions' =&gt; array('referral_partner' =&gt; 0), 'order' =&gt; array('name')));
    echo json_encode($agents);
}
</code></pre>

<p>This is my jQuery code to retrieve/sort (and fill a SELECT box):</p>

<pre><code>$.ajaxSetup({
        async: false
});

$.getJSON("/agents/get_agents",{ajax: 'true'}, function(j) {
    var agents_options = '';

    $.each(j, function(key, value){
        agents_options += '&lt;option value="' + key + '"&gt;' + value + '&lt;/option&gt;';
    })

    $('#t' + agents_counter).html(agents_options);
});
</code></pre>

<p>The jQuery is not keeping the same sort order.</p>
