Lodash .at() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Seq

Definition

The chainable form of _.at. Plucks values from the wrapped object or array at one or more paths. After .value() you always get an array (path order). Part of Lodash 4.x Seq / wrapper prototype.

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

Syntax

Call .at(). Start with this line.

Lodash
_(obj).at(paths).value()
CallWhat it does
_(obj).at(paths).value()Primary signature.

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

Library declarations
Lodash
_(obj).at(paths).value()

Parameters

ParameterDescription
Wrapped valueRequired. Object or array to read
pathsRequired. Dot/bracket strings or path arrays

Return Value

Return ValueDescription
*Wrapper around values array

Lodash Examples

Example 1 — Official nested paths

Dot and bracket paths in one call.

Lodash
var object = { a: [{ b: { c: 3 } }, 4] };

_(object).at(["a[0].b.c", "a[1]"]).value();
// → [3, 4]
Try It Yourself

How It Works

  1. Wrap. _(object) starts the sequence.
  2. Paths. a[0].b.c walks into the nested object → 3.
  3. Second. a[1] is the number 4.
  4. value. Unwraps to [3, 4] in path order.

Example 2 — Rest-style paths

Pass paths as separate arguments.

Lodash
var user = {
  name: "Alice",
  email: "[email protected]",
  address: { city: "Portland" }
};

_(user).at("name", "email", "address.city").value();
// → ["Alice", "[email protected]", "Portland"]
Try It Yourself

How It Works

  1. Rest args. Same as passing an array of paths.
  2. Order. Results follow argument order.
  3. Nested. address.city uses dot notation.
  4. Unwrap. Plain array of three values.

Example 3 — Missing paths

Absent paths become undefined — no throw.

Lodash
var config = { server: { host: "localhost" } };

_(config).at("server.host", "server.port", "database.name").value();
// → ["localhost", undefined, undefined]
Try It Yourself

How It Works

  1. host. Exists → "localhost".
  2. port / name. Missing → undefined.
  3. Length. Array length still equals path count.
  4. Check. Guard for undefined when paths may be absent.

Example 4 — vs _.at()

Wrapper and direct forms match.

Lodash
var object = { a: [{ b: { c: 3 } }, 4] };
var paths = ["a[0].b.c", "a[1]"];

var chained = _(object).at(paths).value();
var direct = _.at(object, paths);

JSON.stringify(chained) === JSON.stringify(direct);
// → true
Try It Yourself

How It Works

  1. Wrapper. Fits inside longer chains.
  2. Direct. One-shot _.at call.
  3. Same. Identical arrays for the same paths.
  4. Choose. Use wrapper when you already chain; else _.at.

Example 5 — vs _.get()

One value vs many values as an array.

Lodash
var user = {
  name: "Bob",
  profile: { age: 28, city: "Austin" }
};

_.get(user, "profile.city");
// → "Austin"

_(user).at("name", "profile.age", "profile.city").value();
// → ["Bob", 28, "Austin"]
Try It Yourself

How It Works

  1. get. One path → one value (optional default).
  2. at. Many paths → array of values.
  3. Pick. Use get for a single field; at to pluck several at once.
  4. See also. _.get.

Browser & Runtime Support

Wrapper .at() ships with Lodash 4.x Seq. It runs anywhere full Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Prefer native plucking or _.at / _.get in tree-shaken modular builds without wrappers.

✓ Stable · Lodash 4.x

Wrapper .at()

Available on wrappers from _(value) / _.chain in [email protected] full builds. Works in evergreen browsers and current Node LTS when Lodash is installed.

100% With Lodash 4.x
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
wrapper.at Lodash 4.x full

Bottom line: Safe for production with full Lodash. Use wrapper .at inside chains; use _.at / _.get for one-shot reads.

Frequently Asked Questions

It is the chainable form of _.at. It plucks values at one or more paths from the wrapped object/array and returns another wrapper. Call .value() for a plain array.
Same logic. Syntax differs: _(obj).at(paths).value() versus _.at(obj, paths).
Always an array — one slot per path, in the same order. A single path still yields a one-element array.
_.get reads one path and returns that value (optional default). .at reads one or many paths and always returns an array of values.
That slot is undefined. Lodash does not throw.
Yes — .at() returns a wrapper around the result array, so you can map/filter before .value().

Next: Wrapper .chain()

Switch a wrapper to explicit chaining so methods like head stay wrapped.

Wrapper .chain() →

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