var StateValue = {
Unknown: 0,
AL: 1,
AK: 2,
AZ: 3,
AR: 4,
CA: 5,
CO: 6,
CT: 7,
DE: 8,
},
Now i need to get the enumValues.
function getKeyValue(stateVal) {
For example 'AK'
I need to get the corresponding value...
}
It is simply:
You can access object properties with bracket notation.
I suggest to read MDC – Working with Objects.