I have javascript object like following:
var endpoints = {
User: {
endpoint: '/api/v1/users/%s',
subResources: {
profile: {
// IN BELOW LINE I WANT TO ACCESS PARENT OBJECT'S Property
endpoint: endpoints.User.endpoint + '/profile'
}
}
}
}
this object has a object called 'User' which has property called endpoint
i want to access this property in it's child object called subResources.endpoint
.