Object to pick from.
Object to use as filter.
Optional
options: { Flatten options.
Optional
filterOptional
inputOptional
unflat// input (values will always come from input)
const input = {
randomValue: 'random',
django: {
allowedHosts: '*',
csrfCookieSecure: false,
},
sentry: {
traceExcludeUrls: ['one', 'two', 'three'],
},
}
// filter only django values (only keys are looked at).
const subsetFilter = {
django: {
allowedHosts: true,
csrfCookieSecure: true,
},
}
const result = pickSubsetDeep(input, subsetFilter)
console.log(result)
// {
// django: {
// allowedHosts: '*',
// csrfCookieSecure: false,
// },
// }
Generated using TypeDoc
Pick a deep subset of an object filtered by key paths of another object.