array = {
event: [{
key: "value",
lbl: "value"
}],
event1: [{
key: "value",
lbl: "value"
}]
var variable;
if(variable in array){
//what to do here?
}
I have a value in the variable which will be the name of the array inside the array (i.e):variable="event" or "event1"; i want a function to return the array with the key in the variable!!