(['user', 'posts', 0, 'comments'],
Safely Accessing Deeply Nested Values In JavaScript
A. Sharif
41919

I use this pattern quite a bit, but using a dot-separated string instead of the array to signify the path to be accessed within the target object.