I have an observable with an array of ids in it and an empty array. I tried to subscribe to the observable and then assign the observable array to the empty array but the empty is undefined when I console log it.
testIds$ = this.tests$.pipe(
map(at => at.map(id => id.testIds)),
);
testIds : number[];
ngOnInit() {
this.testIds$.subscribe(val => this.testIds = val);
console.log(this.testIds$.subscribe(val => console.log("Val: ", val)));
}