I'm dealing with certain difficulties finding a property deep in an object. Here are some scenarios:
{ redacted: true } vs { someProperty: true, anotherProperty: { redacted: true } }
I would like to be able to find redacted
key in any object level. I tried to find some solutions inside libraries lodash
but I didn't have any success.
Would be awesome to achieve something with this interface:
findDeepProperty(obj, 'redacted')
Also, is there a way to achieve this algorithm by using an external library like lodash
?