DEV Community

Discussion on: Accessing Nested Objects in JavaScript

Collapse
 
lucadv profile image
Luca Di Vincenzo • Edited

Or you could use lodash _.get(array[pos].property, defaultValue) and get a way cleaner code.