find-key
Advanced tools
Weekly downloads
Readme
#find-key
Finds matching value of supplied key inside deep nested object
npm install find-key
The return value will be an array of values matching the key name supplied
const Find = require('find-key');
const obj = {
type: 'object',
properties: {
first: {type: 'string', format: 'lookup'},
extra: {type: 'string', format: 'lookup'},
test: {type: 'string', format: 'dbRef'},
},
additionaProperties: false,
format: 'dbRef',
title: 'country schema',
};
const res = Find(obj, 'format');
console.log(res); // should equal an array with the following values ['lookup', 'dbRef']
FAQs
find value inside nested object from key name
The npm package find-key receives a total of 520 weekly downloads. As such, find-key popularity was classified as not popular.
We found that find-key demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.