Please check code below. Here all variable values are static.
var o = { level_a:{}, level_b:{}, . . . .};
var levelVar = "b";
var selected_tab = 'level'+'_'+levelVar; \\level_b
var result = o.selected_tab;
Here you can see var o
is object and var levelVar
and selected_tab
are string. Now I expect I should get value of o.level_b
inside result
, but its not working becuse we can not concat string to object.
Please help.