I have created a Rx.Observable
from a stream of events:
Rx.Observable.fromEvent(recognizeStream, 'data')
In which every data event looks like this:
{ error: null, alternatives: [result1, result2, result3] }
I want to pluck every value inside the array of alternatives
and merge those into the stream. What operators do I have to look at?
As far as I know the flatMap
and concatMap
could do the job but I don't get the idea from their example.
Can somebody explain which operator i should use and provide me with an example?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…