eachDeep, filterDeep, findDeep, pickDeep, omitDeep, keysDeep — recursively navigate, query, and transform nested objects with an intuitive Lodash-style API.
Extends Lodash with powerful deep-tree operations. Use it as a mixin or standalone.
eachDeep visits every node with parent stack, depth tracking, circular reference detection, and leaves-only mode.
filterDeep, findDeep, someDeep �� search nested structures with predicates. Match by value, pattern, or regex.
pickDeep and omitDeep select or exclude nested fields by name, regex, or pattern. Perfect for sanitizing API responses.
paths, index, keysDeep, pathToString �� introspect the full topology of your data. Build path indexes effortlessly.
condenseDeep cleans sparse arrays recursively. exists distinguishes real undefined from array holes �� safer than has.
Works as a Lodash mixin or standalone. ESM, CJS, browser bundle, and TypeScript types �� everything included.
21 methods organized by category. Full TypeScript definitions included.
npm, Browser, or CDN �� pick your setup.
npm install deepdash lodash
const _ = require('lodash');
require('deepdash')(_);
_.eachDeep(data, fn);Copy <script src="lodash.min.js"></script> <script src="deepdash/browser/deepdash.min.js"></script> <script> deepdash(_); </script>Copy
<script src="https://cdn.jsdelivr.net/npm/deepdash/browser/deepdash.standalone.min.js"></script> <script> const _ = deepdash; </script>Copy
Install deepdash, attach it to Lodash, and start traversing nested data.
Add deepdash and lodash to your project.
npm install deepdash lodash
Attach deepdash as a Lodash mixin.
const _ = require('lodash');
require('deepdash')(_);Call eachDeep on any nested data.
_.eachDeep(data, (val, key, parent, ctx) => {
console.log(ctx.path, val);
});const config = {
server: { host: 'api.x.com', port: 443 },
features: { darkMode: true, beta: false },
logging: { level: 'info' }
};
const paths = [];
_.eachDeep(config, (v, k, p, ctx) => {
if (!_.isObject(v) || _.isArray(v)) {
paths.push(ctx.path + ' = ' + JSON.stringify(v));
}
});
console.log(paths.join('\n'));server.host = "api.x.com" server.port = 443 features.darkMode = true features.beta = false logging.level = "info"
Explore all 21 methods in the ????/a> or try them live in the ????.