Skip to content

js-util/fetch-nested-value

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!"

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published