> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/observable/observable_instance_methods/minby.md).

# minBy

Returns the elements in an observable sequence with the minimum key value according to the specified comparer.

## Arguments

1. `keySelector` *(`Function`)*: Key selector function.
2. `[comparer]` *(`Function`)*:  Comparer used to compare elements.

## Returns

*(`Observable`)*: An observable sequence containing a list of zero or more elements that have a minimum key value.

## Example
