# filter-obj-depth **Repository Path**: mirrors_kevva/filter-obj-depth ## Basic Information - **Project Name**: filter-obj-depth - **Description**: Filter object keys and values by depth into a new object - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # filter-obj-depth [![Build Status](https://travis-ci.org/kevva/filter-obj-depth.svg?branch=master)](https://travis-ci.org/kevva/filter-obj-depth) > Filter object keys and values by depth into a new object ## Install ``` $ npm install --save filter-obj-depth ``` ## Usage ```js const filterObjDepth = require('filter-obj-depth'); const obj = { a: { a: 'foo', b: { a: 'foo' } } }; filterObjDepth(obj, 1); //=> {a: {a: 'foo'}} filterObjDepth(obj, (key, val, level, object) => level <= 1); //=> {a: {a: 'foo'}} ``` ## License MIT © [Kevin Martensson](http://github.com/kevva)