How get array value by key in javascript <p>I am getting following <em>javascript</em> array and i need to get value of that array by key. Any suggestion will be appreciated.</p> <pre><code>[Object { 5=7224}, Object { 10=7225}, Object { 25=7226}, Object { 50=7227}] </code></pre> <p>I have created following code - </p> <pre><code>'payment_tariff': { 4142: { 1: [{1: 7223}], 2: [{5: 7224}, {10: 7225}, {25: 7226}, {50: 7227}], 3: [{10: 7228}, {20: 7229}, {50: 7230}, {100: 7231}], 4: [{25: 7232}, {50: 7233}, {100: 7234}, {250: 7235}], 5: [{25: 7236}, {50: 7237}, {100: 7238}, {250: 7239}] } , 4130: { 1: [{1: 7132}], 2: [{5: 7133}, {10: 7134}, {25: 7135}, {50: 7136}], 3: [{10: 7137}, {25: 7138}, {50: 7139}, {100: 7140}], 4: [{25: 7141}, {50: 7142}, {100: 7143}, {250: 7144}], 5: [{25: 7145}, {50: 7146}, {100: 7147}, {250: 7148}] } , 4133: { 1: [{1: 7166}], 2: [{5: 7167}, {10: 7168}, {25: 7169}, {50: 7170}], 3: [{10: 7171}, {25: 7172}, {50: 7173}, {100: 7173}], 4: [{25: 7174}, {50: 7175}, {100: 7176}, {250: 7177}], 5: [{25: 7178}, {50: 7179}, {100: 7180}, {250: 7181}] } , 4134: { 1: [{1: 7188}], 2: [{5: 7189}, {10: 7190}, {25: 7191}, {50: 7192}], 3: [{10: 7193}, {25: 7194}, {50: 7195}, {100: 7298}], 4: [{25: 7197}, {50: 7198}, {100: 7199}, {250: 7200}], 5: [{25: 7201}, {50: 7202}, {100: 7203}, {250: 7204}] } , 4135: { 1: [{1: 7206}], 2: [{5: 7207}, {10: 7208}, {25: 7209}, {50: 7210}], 3: [{10: 7211}, {25: 7212}, {50: 7213}, {100: 7214}], 4: [{25: 7215}, {50: 7216}, {100: 7217}, {250: 7218}], 5: [{25: 7219}, {50: 7220}, {100: 7221}, {250: 7222}] } } </code></pre> <p>I am getting dynamic value of payment_tariff's keys</p> <p>For example, I need to get value of key 5, Where key is some value that will be further processed. </p>