Tech being used: js, jquery, angular, and underscore. I have an array of Objects 0-4. Each object has 2 value pairs "num: it's value" and "text : it's value". So...
var arr = [
{
num: '1',
text: 'First Place'
},
{
num: '2',
text: 'Second place'
},
...
];
Now I have the have the num of the selected object, but I need to switch to the text.
This is working - "object 0 | num : 1" is selected store 1 in variable (selectedNum). How do I code based on selectedNum find the object that has 1 and return text of said object to variable selectedText.
Prefered answer using underscore.js.