In this stackoverflow thread, i learnt you can get a object path via a simple string.
Accessing nested JavaScript objects with string key
consider the follow
I found the following solution on github.
https://github.com/mariocasciaro/object-path