This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Description
$(document)
.readyAsObservable()
.flatMap(function(obj) {
return $.ajaxAsObservable({
url: 'cityList',
dataType: 'jsonp'
});
})
.flatMapLatest(function(res) {
return res.list; // is Arrary
})
.reduce(function(acc, x, idx, source) {
alert(acc); //has data
return acc + '<div></div>';
}, '')
.subscribe(function(x) {
alert(x); //Does not perform
}, function(err) {
alert(err); //Does not perform
},
function() {
alert('Completed'); //Does not perform
});