I am attempting to clone and update an object in order to store it as a new instance in an array, but I am encountering some issues.
Can anyone assist me in resolving this issue?
Here is my code snippet:
public getAppPropeties(locales):Observable<any>{
const msgParms = [];
locales.forEach((locale, i) => {
this.messageParam['bd']['locale']=String(locale);
msgParms[i] = Object.assign({}, this.messageParam); ;
});
console.log( 'msgParms', msgParms ); //getting last value
}