# deep-find

> find value for deep nesting keys

Latest version **1.1.0** (published 2020-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install deep-find
pnpm add deep-find
yarn add deep-find
bun add deep-find
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-04-05 |
| First published | 2015-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Yashprit Singh |
| Maintainers | yashprit |
| Keywords | deep-find, deep, nesting, keys, value |

## Links

- npm: https://www.npmjs.com/package/deep-find
- Repository: https://github.com/yashprit/deep-find
- Homepage: https://github.com/yashprit/deep-find#readme
- npm.io page: https://npm.io/package/deep-find

## Recent versions

- 1.1.0 (latest) — 2020-04-05
- 1.0.0 — 2017-04-03
- 0.0.0-alpha — 2015-04-15

## README

# deep-find [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image]

> find value for deep nested keys


## Install

```sh
$ npm install --save deep-find
```


## Usage

### JavaScript

```js
var deepFind = require('deep-find');

var obj = {
  employee:{
    name: {
      first: 'yash',
      last: 'singh'
    }
  }
}

deepFind(obj, 'employee.name.first');
```

## Methods

```js
var deepFind = require('deep-find');
```

### deepFind([object], [array])

pass array as argument

```js
var deepFind = require('deep-find');
var obj = {
  employees: [{
    name: {
      first: 'yash',
      last: 'singh'
    }
  }, {
    name: {
      first: 'ruby',
      last: 'singh'
    }
  }]
}

var value = deepFind(obj, ['employees[0]', 'name', 'first']);
```

### deepFind([object], [string])

pass string as argument

```js
var deepFind = require('deep-find');
var obj = {
  employees: [{
    name: {
      first: 'yash',
      last: 'singh'
    }
  }, {
    name: {
      first: 'ruby',
      last: 'singh'
    }
  }]
}

var value = deepFind(obj, 'employees[0].name.first');
```

## Run Test
```sh
npm test
```

## Benchmark
```sh
node benchmark.js
regular search x 1,212,008 ops/sec ±1.61% (81 runs sampled)
```

## Contribute or Report Issue
For bugs and feature requests, [please create an issue][issue-url].


## License

MIT © [Yashprit Singh](https://yashprit.github.io)

[issue-url]: https://github.com/yashprit/deep-find/issues
[npm-url]: https://npmjs.org/package/deep-find
[npm-image]: https://badge.fury.io/js/deep-find.svg
[travis-url]: https://travis-ci.org/yashprit/deep-find
[travis-image]: https://travis-ci.org/yashprit/deep-find.svg?branch=master
[daviddm-url]: https://david-dm.org/yashprit/deep-find.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/yashprit/deep-find

---
_Source: https://npm.io/package/deep-find · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
