javascript - Search with a variable in array -


i trying search array variable, seems not work because thinks variable value.

var variable = "create";  var navviews = {     "create" : [         {             "id"        : "1",             "name"      : "create",             "urlext"    : "stylecreator"         }     ] } navviews.variable; 

how reach "create" through variable?

if want create array, can in way:

navviews[variable] 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -