If I have 2 Observable arrays, x$ and y$:
let x = new BehaviorSubject([1,2,3])
let y = new BehaviorSubject([4,5,6])
let x$ = x.asObservable();
let y$ = y.asObservable();
that I'd like to accumulate into a single array of values such that when subscribed to would emit [1,2,3,4,5,6], how can I achieve that?
x.next(7)?[1,2,3,4,5,6,7]x.next([1, 2, 3])and sometimes individual values likex.next(7)?x.next([1,2,3,4])andy.next([4,5,6,7])to emit[1,2,3,4,4,5,6,7]