Rx.Observable.prototype.indexOf(searchElement, fromIndex)

Returns the first index at which a given element can be found in the observable sequence, or -1 if it is not present.

Arguments

  1. searchElement (Any): An element to locate in the array.
  2. fromIndex (Number): The index to start the search. If not specified, defaults to 0.

Returns

(Observable): An observable sequence containing the first index at which a given element can be found in the observable sequence, or -1 if it is not present.

Example