Here is my function:
function RemoveOutputKeys(array){
  var temp = array;
  for(var object in temp){
    delete temp[object]['statusCode']
    delete temp[object]['statusResponse']
  } 
  console.log(array)
  if(temp == array)
    console.log("how is this possible?!?!!?!?!")
  return temp
}
and here is the input I am providing,
array = [{'statusCode':400},{'statusCode':200}]
It makes sense for temp to get updated but I don't want the array to get updated. How can i fix this issue?
Thanks
 
     
    