Looking for a "whitelist" object with the following structure:
{
a: {
b: {
c: ''
}
}
}
Trying to apply this object to the following:
{
a: {
b: {
c: 1
},
d: 2,
e: 3
}
}
The expected result should be:
{
a: {
b: {
c: 1
}
}
}
Any suggestions on how to implement this using underscore? I tried using _.pick but had issues with the nested properties.