I am waiting for a number from server, once I get the number, I want to find an according id name to change the background of that div.
So, I created a set of key and value
var timelineKeys = {
        "4": "btn_no_1",
        "5": "btn-no-2",
        "6": "btn-no-3",
        "7": "btn-no-4",
        "1": "btn-no-5",
        "2": "btn-no-6",
        "2": "btn-no-7",
    }
in my $.ajax, I get the variable from server and I call it 't', 't' will be one of the key numbers there, but how can I get text "btn-no-.." dynamically using this variable? timelineKeys.t seems doesn't work.
Thanks
 
     
    