New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

value-from-nested-obj

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

value-from-nested-obj

Use a file path with a user-specified separator to grab a value from a nested object

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

value-from-nested-obj

Use a file path with a user-specified separator to grab a value from a nested object.

Install

npm install value-from-nested-obj

Usage

import valueFromNestedObj from 'value-from-nested-obj';

const objToTraverse = {
  my: {
    nested: {
      path: 'my nested value'
    }
  }
}

// First param is the nested path, the second is the path separator, and the third is the js object
const value = valueFromNestedObj('my.nested.path', '.', objToTraverse);

Keywords

path

FAQs

Package last updated on 04 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts