Like _.forOwn, but iterates own enumerable string keys of object in the opposite order. Inherited prototype keys are skipped. Part of Lodash Object since 2.0.0 (stable — not deprecated).
Pass the object and path or keys shown below. Check whether the helper mutates or returns a new object.
Syntax
Call _.forOwnRight. Start with this line.
Lodash
_.forOwnRight(object, [iteratee])
Call
What it does
_.forOwnRight(object, [iteratee])
Primary signature.
_.forOwnRight(object)
Work with an object’s keys, values, or paths.
Prefer import forOwnRight from "lodash/forOwnRight" when you want a smaller bundle.
Library declarations
Lodash
_.forOwnRight(object, [iteratee])
Parameters
Parameter
Description
object
Required. The object to iterate over
iteratee
Optional. Invoked per key; default _.identity
Return Value
Return Value
Description
*
The original object
Lodash Examples
Example 1 — Official: Reverse Own Keys
Own keys are visited opposite to _.forOwn; prototype c is skipped.
Both reverse. Direction is reversed relative to their forward counterparts.
Choose. Use forOwnRight when inherited keys must be ignored.
Compatibility
Browser & Runtime Support
_.forOwnRight is a Lodash Object helper (available since 2.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 2.0.0+
_.forOwnRight()
Available in [email protected] full builds and the lodash/forOwnRight 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
_.forOwnRightLodash 2.0.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import forOwnRight from "lodash/forOwnRight" for smaller builds. Use _.forInRight when inherited keys must be included.
Frequently Asked Questions
_.forOwnRight(object, iteratee) iterates over an object's own enumerable string-keyed properties in the opposite order of _.forOwn. It returns the original object.
The iteratee is invoked with (value, key, object).
Yes. Explicitly return false from the iteratee to exit iteration early.
Same key coverage (own enumerable string keys only). Opposite walk order.
_.forOwnRight visits own keys only. _.forInRight also visits inherited enumerable keys, also in reverse.
Use import forOwnRight from "lodash/forOwnRight" or require("lodash/forOwnRight"). Full build: import _ from "lodash" then _.forOwnRight.