how can I dynamically add key in array of object?
<pre><code>var arr=[];
$.each($("#id").serializeArray(), function (i, field) {

    arr.push({
        field.name : field.value
    });

 });
</code></pre>

<p>I want field.name should be dynamic. </p>