I am defining an object inside a file I will export and require it has alot of config keys
var a = {
main: { key1 : {label: 'one' value: 1 },
key2 : {label: 'two' value: 2 },
//etc...
}
selectedKeyValue : this.main.key1.label
}
the benefit being that label can change often and I can always keep track of what it is if it ever gets edited, without ever needing to edit selectedKeyValue
This obviously give me and error, but is there anyway to have access to the obj's values while defining it such that I can do this?