Access Nested Object Dynamically Javascript Interview Question