Consider the following scenario: I have an array called "x" and an Observable created from this array (arrObs). There is a button on the page, and when a user clicks on it, a random number is added to the array. The goal is to display the newly added value from the array whenever a new value is pushed into it.
http://jsbin.com/sovuyipuju/edit?js,console,output
var x = [1,2,3,4];
var clicks = Rx.Observable.fromEvent(document.querySelector('#button1'),'click');
clicks
.map(function(y){return Math.floor(Math.random()*50)})
.subscribe(function(z){ x.push(z);});
arrObs = Rx.Observable.from(x);
arrObs
.map(function(x){ return x*2;})
.subscribe(function(value){console.log(value);
});