Write a function named pickNested
that receives 2 parameters:
data
data
object - path
The function should return the value of the property at the given path. If there is no property at the given path, the function should return undefined
.
NOTE: this is similar with the pickFields function but a little bit more complex as it is dealing with nested objects.
data
=path
=data
=path
=