I am trying to search an array with a variable, which seems to not work because it thinks the variable itself is a value.
var variable = "create";
var navViews = {
"create" : [
{
"id" : "1",
"name" : "Create",
"urlext" : "stylecreator"
}
]
}
navViews.variable;
How do I reach "create" through a variable?
navViews[variable]navViews.variable;will check for"variable"insidenavViews