Good time, i have an array of objects like this:
var sections = [ {key: 0, label: 'Nothing'}, {key: 11, label: 'Alex Right'},{key: 12, label: 'Dolores Black'},{key: 21, label: 'Bobby Smith'},{key: 26, label: 'Andrew Small'} ];
So, for example, i want to get label that is for key=12 (it have to be Dolores Black). If i use something like:
alert(sections[11]['label']);
this will be wrong, cause it will find 12th element of array, not an element with key=12. So what is th right expression for my case? Thanks