Observablewith the iterable pattern, and lets us conceptualize them as collections.
filter. What exactly do these do?
mapwill create a new array with the results of calling a provided function on every element in this array. In this example we used it to create a new result set by iterating through each item and appending the "Dr." abbreviation in front of every user's name. Now every object in our array has "Dr." prepended to the value of its name property.
filterwill create a new array with all elements that pass the test implemented by a provided function. Here we have used it to create a new result set by excluding any user whose
idproperty is less than six.
subscribecallback gets invoked, the data it receives will be a list of JSON objects whose
idproperties are greater than or equal to six and whose
nameproperties have been prepended with
Observable, as in
Observables, similarly to promises. In order to use
filterin a chaining sequence we have flattened the results of our
Observable, and not an array, we have to convert our array of JSON objects from
Observablestream. This is done with