How to convert JSON Array to Javascript Object Array
<p>I have the following JSON value pushed from the server.</p>

<pre><code>         result=[{"id":1492,"name":"Delhi"},
                 {"id":109,"name":"Coimbatore"},
                 {"id":576,"name":"Konni"},
                 {"id":525,"name":"Kottayam"}
                ]
</code></pre>

<p>I know how to convert JSON Array to Javascript Array.Here is the code below(got from stackoverflow)</p>

<pre><code>        var locations = [];
        $.each(result, function(i, obj) {
            locations.push([obj.id,obj.name]);
        });
</code></pre>

<p>I want to convert this JSON Array to a JavaScript Object Array so that I can access the values as <code>jarray[0].id</code> which will give me the value 1492. Please advice</p>
