Javascript Associative Arrays
Posted
by John Hartsock
on Stack Overflow
See other posts from Stack Overflow
or by John Hartsock
Published on 2010-04-23T00:41:21Z
Indexed on
2010/04/23
0:53 UTC
Read the original article
Hit count: 372
JavaScript
|associative-array
Hello all,
It seems to me that this should work but I cant see what exactly is the problem.
The error Im receiving is "DDROA is not defined"
Could anyone help enlighten me.
var DDROA = {
AllowedRoutes : {
AR0 : {text : 'SomeText', value : 'SomeValue'},
AR1 : {text : 'SomeText2', value : 'SomeValue2'}
},
RouteContext : {
RC0 : {text : 'None', value : '0',
AllowedRoutes : new Array(
DDROA.AllowedRoutes.AR0 // An error occurs here
)
}
}
}
© Stack Overflow or respective owner