# find-value-of-key

> The findValueOfTheKey function is a utility designed to delve into a deeply nested JavaScript object and locate the value associated with a specified target key. By recursively traversing the object's structure, the function efficiently uncovers the desir

Latest version **1.0.2** (published 2023-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-value-of-key
pnpm add find-value-of-key
yarn add find-value-of-key
bun add find-value-of-key
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-08-12 |
| First published | 2023-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | aleksandarLazic1998 |
| Maintainers | aleksandar_lazic1998 |
| Keywords | value finder, object traversing, finding value in nested objects, javascript, typescript, esm, cjs |

## Links

- npm: https://www.npmjs.com/package/find-value-of-key
- Repository: https://github.com/aleksandarLazic1998/findValueOfTheKey
- Homepage: https://github.com/aleksandarLazic1998/findValueOfTheKey#readme
- Issues: https://github.com/aleksandarLazic1998/findValueOfTheKey/issues
- npm.io page: https://npm.io/package/find-value-of-key

## Dependencies (2)

- [typescript](https://npm.io/package/typescript.md) ^5.1.6
- [query-builder-al](https://npm.io/package/query-builder-al.md) ^1.0.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-08-12
- 1.0.1 — 2023-08-12
- 1.0.0 — 2023-08-12

## README

# findValueOfTheKey

A utility function to recursively search through a deeply nested object and find the value associated with a specific key.

## Installation

```bash
npm install find-value-of-the-key
```

## Usage
```bash
const findValueOfTheKey = require('find-value-of-the-key');

const nestedObject = {
  a: {
    b: {
      c: {
        d: 'target value'
      }
    },
    e: {
      f: 'another value'
    }
  }
};

const targetKey = 'd';
const value = findValueOfTheKey(nestedObject, targetKey);
console.log(value); // Output: 'target value'

```

Contributions to this utility are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/aleksandarLazic1998/findValueOfTheKey).

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