When working with nested objects using dot notation, it can be tedious to constantly check if each previous object exists.
I'm looking for a solution that avoids lengthy if chains like
if (a && a.b && a.b.c && a.b.c[0] ... ) { v = a.b.c[0]; }
The only alternative I've considered is using try catch blocks.
var v; try { v = a.b.c[0].d.e; } catch (e) {}
Is there a more effective pattern to handle this situation?