I have setup this js object:
var tableTypes = {
"stockRcmnd":{
"name":"stockRcmnd",
"columns": ['1','2', '3']
},
"stockChange":{
"name":"stockChange",
"columns": ['4','5', '6']
}
};
now, I want to get the columns , dynamically:
property = "stockChange";
columns = tableTypes.{property}.columns;
property = "stockRcmnd";
columns = tableTypes.{property}.columns;
here is a jsfiddle;
any idea how to do it?