I have an nested object as follows: testObj = { user : { email : 'akshay' } }; When I put user.email in object-property, it gives undefined.