// 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,
//   },
// }
Pick a deep subset of an object filtered by key paths of another object.