title: Javascript object keep contain the old data
body: <p>I am trying to filter result from JSON string based on status selection. I will explain more in depth. In respect to below code, jsonstring contain the whole javascript object.I filter status by grep function and than i added result into main object(jsonstring) so i can get whole javascript object with new filter status. But each time this drop down called i am getting last updated javascript object but i want the original jsonstring each time this function call.</p>
  
  <pre><code>function dropdownchange(jsonstring)
  {
   var e = document.getElementById("documents_filter");
   var svalue = e.options[e.selectedIndex].value;
  
   if(svalue == "In Progress")
   {
    var docstatusfilter;
    docstatusfilter = $.grep(jsonstring.Apps.statuslist , function(el, i) {
             return el.DOCUMENT_STATUS === "In Progress"        
              });   
      jsonstring.Apps.statuslist = docstatusfilter;   
   }
  
   if(svalue == "Auth (Verified)")
   {
    var authstatus;
    authstatus = $.grep(jsonstring.Apps.statuslist , function(el, i) {
             return el.DOCUMENT_STATUS === "Auth (Verified)"          
              });    
     jsonstring.Apps.statuslist = authstatus;    
   }
  
  }
  </code></pre>
  
  <p>When this function call first time it works perfect but once i change dropdown it contain the previous record in jsonstring but i want the original jsonstring each time when this function call..</p>
  
  <p>Anybody have any idea?</p>
  
  <p>Thanks</p>