I have this:
values = [];
In ts i have multiple services that they have been called in different time. I trie to add that values of objects in array, but that values can be changed and i dont want to add always them in array, i want to assign if the objects values has been changed.
this.values = this.values.map(a=>) Object.assign(this.values, [{ title: 'E-mail', indicator: this.emailData.length }]);
this.values = this.values.map(a=>) Object.assign(this.values, [{ title: 'Assgnment', indicator: this.assignments.length }]);
and so on. But it always add one object and thats it. ANy suggestion?
EDIT:
if i add this:
this.values.push(
{ title: 'E-mail', indicator: this.emailData.length }
)
If value has been changed i will have multiple objects with title:'E-mail', because it will always push in array new objects even if only indicator has been changed and i dont want that