I'm working on a function that looks like this:
this.localStorage.getItem('user').subscribe(user => {
this.user = user;
this.authSrv.getOrders(this.user.einsender).pipe(map(orders => {
map(order => { order["etz"] = "23"; return order})
return orders;
})).subscribe(orders => {
this.orders = orders;
this.completeOrders = orders;
console.log(orders);
this.waitUntilContentLoaded = true;
})
})
When I run the function without the map, the result is:
[{id: 1, etz: "21"}]
After adding the map to loop through the array, update the order and set a new value for the etz
property, the change doesn't seem to be taking effect. Can someone take a look and provide some assistance?
Your help is greatly appreciated!