acessando-se-aninhado-Javascript-Objects-e-Arrays-By-String-Path
function resolve(path, obj=self, separator='.') {
var properties = Array.isArray(path) ? path : path.split(separator)
return properties.reduce((prev, curr) => prev && prev[curr], obj)
}
Octavian Lelescu