@js-util/fetch-nested-value

1.0.4 • Public • Published

fetch-nested-value

Fetch nested value within an object, using a dot notation string, eg: "hello.world"

npm install

npm install --save @js-util/fetch-nested-value

Example usage

// Importing the module
const fetchNestedValue = require("@js-util/fetch-nested-value");

// Example object to fetch from
const obj = {
	"hello": {
		"world" : "its ok!"
	}
};

// This fetches and return a nested value
fetchNestedValue( obj, "hello.world" ); // > "its ok!"

Package Sidebar

Install

npm i @js-util/fetch-nested-value

Weekly Downloads

30

Version

1.0.4

License

MIT

Unpacked Size

2.93 kB

Total Files

4

Last publish

Collaborators

  • picocreator