So, I am using ngrx store for getting data. Once I select the property I want from the store, after then I subscribed it to get observable stream. My data contains array of object. So in this array of objects, I have to do some modifications in some properties of each objects.
So for that I converted my array of objects into sequential observable by using 'from()' operator of rxjs library and then assign this into new Observable object. With this new Observable object, I applied map function for doing modification and at the end again returned a new Observable object. Till this step everything is working fine. Problem occurs, when I am subscribing to this new modified observable object it is emitting values sequentially not the whole array of objects. But I want modified array of objects.
this.statusObj = this.store.select(s => s.userStore.data);
this.statusObj.subscribe(rslt => {
this.usrArr = rslt;
})
this.newstatusObj = from(this.usrArr);
this.newstatusObj2 = this.newstatusObj
.pipe(map(() => {
//////some modifications
return
}))
this.newstatusObj2.subscribe(val => {
console.log(val); //this line is emitting sequential values..but i want array of objects
})