Skip to content

Joshsteverson/deep-pluck-ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Pluck Ref

Contextual Deep Pluck

Deep pluck ref finds the desired properties and plucks the parent object reference.

Installation

$ npm install deep-pluck-ref

Usage

import deepPluckRef from 'deep-pluck-ref';

const obj = {
	do: {
		all: {
			the: {
				things: [
					{
						thing: 'one',
						value: 'thing one value'
					},
					{
						thing: 'two',
						value: 'thing two value'
					},
					{
						thing: 'three'
					}
				]
			}
		}
	}
};
const results = deepPluckRef(obj, ['value']);
// [ { thing: 'one', value: 'thing one value' }, 
// { { thing: 'two', value: 'thing two value' } ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published