Add to array or object with INDEX
<p>how can i generate array or object with own index?</p>

<p>in php i can:</p>

<pre><code>$array = array();

foreach($users as $user){
   $array[$user] = $user;
} 
</code></pre>

<p>and in jQuery?</p>

<pre><code>var arr = new Array();
$('input').each(function(){
   arr[$(this).val()] = $(this).val();
})
</code></pre>

<p>i would like use JS Object for this, but how?</p>
