I want to convert array of array into array of key-value pairs using javascript or jquery.
i have array of array like :
var arrOfarr = [[1,'One'],[2,'Two'],[3,'Three']];
how do i convert arrOfarr into the array of key-value pairs that looks like
[{id:1,text:'One'},{id:2,text:'Two'},{id:3,text:'Three'}]