Performs a partial deep comparison between object and source to see if object contains equivalent property values. Part of Lodash Lang since 3.0.0 (stable — not deprecated).
Pass the value you want to inspect or convert. Read the return type carefully before you use the result.
Syntax
Call _.isMatch. Start with this line.
Lodash
_.isMatch(object, source)
Call
What it does
_.isMatch(object, source)
Primary signature.
_.isMatch(value)
Check, compare, clone, or convert a value.
Prefer import isMatch from "lodash/isMatch" when you want a smaller bundle.
Library declarations
Lodash
_.isMatch(object, source)
Parameters
Parameter
Description
object
Required. The object to inspect
source
Required. Property values that must match
Return Value
Return Value
Description
*
true if object matches source, else false
Lodash Examples
Example 1 — Official: Matching Source
When the required source property matches, the result is true.
_.isMatch is a Lodash Lang helper (available since 3.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.
✓ Stable · Lodash 3.0.0+
_.isMatch()
Available in [email protected] full builds and the lodash/isMatch 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
_.isMatchLodash 3.0.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import isMatch from "lodash/isMatch" for smaller builds. For reusable filters, prefer _.matches(source).
Frequently Asked Questions
_.isMatch(object, source) performs a partial deep comparison and returns true when object contains equivalent property values for every key in source. Extra keys in object are ignored.
_.isEqual requires full structural equality both ways. _.isMatch only checks that source is a subset match of object.
An empty object or empty array as source matches any object or array value respectively. That is intentional partial-comparison behavior.
Yes. Lodash documents that _.isMatch is equivalent to _.matches when source is partially applied — useful as a filter predicate.
Yes. Nested objects and arrays are compared deeply using the same equivalence rules as _.isEqual for the paths present in source.
Use import isMatch from "lodash/isMatch" or require("lodash/isMatch"). Full build: import _ from "lodash" then _.isMatch.