I want to turn an array such as:
[[0,0], [1, 1], [2, 2]]
into
[{Duration: 0, Title: 0}, {Duration: 1, Title: 1}, {Duration: 2, Title: 2}]
I was thinking of doing something like:
var a = [[0,0], [1, 1], [2, 2]];
_.map(a, function() {return {Duration: , Title: } });
But I'm not able to reference the current value I'm looping at. What is the simplest way to do this?