Convert JavaScript array into array of object
What is the fastest algorithm for getting from something like this: var array = [ 'a','b','c','d','e' ]; to something like this: [{label:'a',value:'a'},{label:'b',value:'b'},{label:'c',value:'c'},{label:'d',value:'d'},{label:'e',value:'e'}]