Q:

Pushing Objects Into Array repeats last entry

I have a quite complex object which I have to fill partly with data coming from an API. 
Lets asume my object looks like this
{
   attribute1: number, 
   attribute2: number, 
   static1: number,
   static2: number,
}

I have a function that return a Object with set static values. 
Now i have to fill the other attributes with the API response. 
My try:
private pretifyApiResponse(apiResponse) {
const template = this.getTemplate();

console.log(template); // {attribute1: 0, attribute2: 0, static1: 123, static2: 456}

const result: myInterface[] = [];

for (let i = 0; i < apiResponse.length; i++) {
   template.attribute1 = apiResponse[i].attribute1 || 0;
   template.attribute2 = apiResponse[i].attribute2 || 0;

   console.log(i+'.  Template'); 
   console.log(template);
   result.push(template);
}

console.log('Final Result')
console.log(result);

The thing is now, inside of my loop the results are correct and also the template is.    
But after the loop the array contains only the last entry, but x times.  
Here the logs of my function above

A:

To bypass the reference and create a copy I found a somehow questionable method. 
JSON.parse(JSON.stringify(template));

It works though, but it feels kinda hacky. 
I was trying to use Object.assign(), but I ran into the same problem. 
A real solution to this problem would be appreciated.