jquery: how set in object another one object with key like - this.id?
<p>if i write:</p>

<pre><code>function myindex(name){
var cut_point = name.lastIndexOf('_')+1;
return name.substring(cut_point);
}
...
var ind = myindex(some_id);    
var data_users = {};
var $data_users = $(data_users);
$data_users.prop('user_'+ind,{this.id:$(this).val()});
</code></pre>

<p>were this.id = 'login'( from &lt;\input type="text" id="login"> value="&lt;\?=$user->Login ?>"/>) it will be wrong. but i neeed:</p>

<blockquote>
  <p>data_users = {
                 user_3: {
                         login: Rocsana
                       }
               }</p>
</blockquote>

<p>for example, if I write so:</p>

<pre><code>$data_users.prop(this.id,$(this).val());
</code></pre>

<p>then key setting correct:</p>

<blockquote>
  <p>data_users = {login: "Rocsana"}</p>
</blockquote>

<p>but i need this in object 'user_3'. please help.</p>

<p>p.s. I need to track every change in fields linked to the user, adding them (changes) in the object and then the changes I am sending ajax in php, using json. for example</p>

<blockquote>
  <p>data_users {user_3 {login: Rocsana, role: Admin, e-mail:
  test@test.com}, user_2 {...}}</p>
</blockquote>

<p>keys "login", "role", ... identical to the fields of the table "Users". it's easier to make a database query "UPDATE". just parse the object and received the names of the fields that need to update.</p>
