title: For the existing object add a newly created object without modifying the other objects, here its loosig other properties
body: <p><code>branchAccess.pendingList[i]</code> object loosing other properties like it had.</p>
  
  <p><code>branchAccess.pendingList[i].testMyAccessStatus</code> its <code>undefined</code> after assigning newly added. can we use <code>angular.copy</code> or <code>angular.clone</code> to keep the object with its existing properties and also add a newly created object <code>accessStatusDetails</code>?</p>
  
  <p>This is my code:</p>
  
  <pre><code>this.selectAll = function(branchAccess) {
  
          //checking if undefined
              var accessStatusDetailsAdd = {
                       accessStatusDetails : { accessStatus : "A" }
                  }
  
              if(branchAccess.pendingList[i].accessStatusDetails == undefined){
                  branchAccess.pendingList[i] = accessStatusDetailsAdd;
              }
  
          }   
  </code></pre>