I am trying to clone and update an object to store in array as new instance. but not works.
any one help me to sort this out?
here is my try:
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
}