Like _.min, except it accepts an iteratee that ranks each element. Returns the original element with the lowest score. Part of Lodash Math since 4.0.0 (stable — not deprecated). The iteratee is called with one argument: (value).
Pass the numbers or collection shown below. Check the return value before you chain another math helper.
Syntax
Call _.minBy. Start with this line.
Lodash
_.minBy(array, iteratee)
Call
What it does
_.minBy(array, iteratee)
Primary signature.
Prefer import minBy from "lodash/minBy" when you want a smaller bundle.
Library declarations
Lodash
_.minBy(array, iteratee)
Parameters
Parameter
Description
array
Required. Array to iterate over
iteratee
Optional. Function or property path; invoked as (value)
Objects._.minBy returns the object that owns the smallest n.
Same idea. Both find a minimum — different return shapes.
Rule. Numbers → min; properties → minBy.
Compatibility
Browser & Runtime Support
_.minBy is a Lodash Math helper (available since 4.0.0, stable in 4.x). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native alternatives map then reduce; Lodash adds iteratee shorthands.
✓ Stable · Lodash 4.0.0+
_.minBy()
Available in [email protected] full builds and the lodash/minBy modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.minByLodash 4.0.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import minBy from "lodash/minBy" for smaller builds. Use property shorthand for simple fields; use a function for computed ranks.
Frequently Asked Questions
_.minBy(array, iteratee) is like _.min, but ranks each element by an iteratee first. It returns the original element with the lowest score — official docs: { n: 1 } from [{ n: 1 }, { n: 2 }].
_.min compares array values directly. _.minBy maps each element through an iteratee (function or property path), compares those scores, then returns the original winning element. Use _.minBy for object arrays.
Yes. _.minBy(arr, 'n') is the _.property shorthand for reading o.n. Nested paths like 'price.base' work too.
Like _.min, empty or falsey arrays return undefined — no throw, no Infinity.
The first element that reaches the minimum score wins. Later equals do not replace it.
Use import minBy from "lodash/minBy" or require("lodash/minBy") so bundlers can tree-shake. Full build: import _ from "lodash" then _.minBy.