title: How to create a JSON list?
body: <p>I have to form a JSON object like</p>
  
  <pre><code>var SelectedRows=   {
          "item1":{"id":"1","name":"jhon","phone":"6699"},
          "item2":{"id":"2","name":"Aron","phone":"7799"},
          "item2":{"id":"3","name":"Iyan","phone":"8899"},
          }
  </code></pre>
  
  <p>On check box click event, I need to add the grid row values to the JSON list. I am trying with this code:</p>
  
  <pre><code>var SelectedRows={};
  
  $(this).delegate(":checkbox", "click", function() {        
      var j=0;
      var item=[];
      SelectedRows[item]={};        *//I guess this line creating problem*     
      $(this).closest("tr").find("td:visible").each(function(){            
          var key=headerRow[j]["i"];            
          if(j == 0)
          {              
          }
          else
          {   
              SelectedRows[item][key]=$(this).text(); 
          }
          j=++j; 
       });
  </code></pre>
  
  <p>After multiple checkbox click events happening,<code>SelectedRows</code> contains only last click event data.</p>
  
  <p>How get all the checkboxes click events data?</p>