Lodash _.prototype.value() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Seq

Definition

Executes the chain sequence to resolve the unwrapped value — plain JavaScript data (array, object, number, …). Call it on a Lodash wrapper from _(value) or _.chain(value). Part of Lodash Seq (since 0.1.0).

Call it on a Lodash wrapper. Finish with .value() when you need a plain result.

Syntax

Call _.prototype.value(). Start with this line.

Lodash
wrapper.value()
CallWhat it does
wrapper.value()Primary signature.

Prefer import _ from "lodash" (full build) when you need wrapper prototype helpers.

Library declarations
Lodash
wrapper.value()

Parameters

ParameterDescription
ReceiverRequired. A Lodash wrapper instance

Return Value

Return ValueDescription
*Resolved unwrapped value (*)

Lodash Examples

Example 1 — Official Unwrap

Resolve a simple wrapped array.

Lodash
_([1, 2, 3]).value();
// → [1, 2, 3]
Try It Yourself

How It Works

  1. Wrap. _([1, 2, 3]) creates a Seq wrapper.
  2. Unwrap. .value() resolves pending actions.
  3. Result. You get a plain array back.
  4. Docs. Matches the official Lodash example.

Example 2 — Map + Filter Pipeline

End a multi-step chain with .value().

Lodash
_([1, 2, 3, 4])
  .map(function (n) { return n * 2; })
  .filter(function (n) { return n > 4; })
  .value();
// → [6, 8]
Try It Yourself

How It Works

  1. Map. Double each number → [2, 4, 6, 8].
  2. Filter. Keep values > 4 → [6, 8].
  3. Value. Runs the queue and returns plain data.
  4. Pattern. This is the usual end of an explicit chain.

Example 3 — value vs commit

Same flush idea; different return type.

Lodash
var a = [1, 2];
var b = [1, 2];

var afterValue = _(a).push(3).value();
var afterCommit = _(b).push(4).commit();

[
  Array.isArray(afterValue),
  typeof afterCommit.value === "function"
];
// → [true, true]
Try It Yourself

How It Works

  1. value. Returns a plain array — chain ends.
  2. commit. Returns a wrapper — you can keep chaining.
  3. Both. Apply the deferred push.
  4. Rule. Done with Lodash → value; more steps → commit.

Example 4 — Flush a Deferred push

.value() applies pending mutations.

Lodash
var array = [1, 2];
var wrapped = _(array).push(3);

JSON.stringify(array);
// → "[1,2]"

wrapped.value();

JSON.stringify(array);
// → "[1,2,3]"
Try It Yourself

How It Works

  1. Queue. .push(3) is deferred on the wrapper.
  2. Before. The original array is still [1, 2].
  3. Value. Flushes actions and unwraps.
  4. After. array is [1, 2, 3].

Example 5 — valueOf Alias

Official aliases resolve the same unwrapped result.

Lodash
var wrapped = _([10, 20]).map(function (n) {
  return n + 1;
});

[
  wrapped.value(),
  _([10, 20]).map(function (n) { return n + 1; }).valueOf()
];
// → [[11, 21], [11, 21]]
Try It Yourself

How It Works

  1. value. Explicit unwrap of the mapped chain.
  2. valueOf. Same resolution via the official alias.
  3. Result. Both yield [11, 21].
  4. Style. Prefer .value() in tutorials for clarity.

Browser & Runtime Support

Wrapper .value() is a Lodash Seq prototype method (since 0.1.0). It needs no special browser APIs beyond loading Lodash.

✓ Stable · Lodash 0.1.0+

_.prototype.value()

Available in [email protected] full builds when using _(value) / _.chain(value). Works in evergreen browsers and Node / Bun / Deno when Lodash is installed.

100% With Lodash
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
.value() Lodash 0.1.0+

Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer the full lodash build for Seq / wrapper APIs.

Frequently Asked Questions

It executes the chain sequence and returns the resolved unwrapped value — plain JavaScript data. Official docs: _([1, 2, 3]).value() → [1, 2, 3].
.value() runs pending steps and returns plain data (chain ends). .commit() runs pending steps but returns a new wrapper so you can keep chaining.
Official docs list aliases toJSON and valueOf. They resolve the same unwrapped result in those contexts.
On explicit chains (_.chain / .chain()), yes — unwrap at the end. In hybrid _(value) mode, some methods auto-unwrap; .value() is still the clear way to finish a pipeline.
No. Call wrapped.value() with empty parentheses.
No. Call it on a wrapper from _(value) or _.chain(value). Docs list it as _.prototype.value().

Next: _.tap()

Intercept a value in a chain for side effects without changing it.

_.tap() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

9 people found this page helpful