score:2

Accepted answer

What you're looking for is the zip function in d3:

d3.zip(wordsArray, computationArray).map(function(e) {
    return { words: e[0], count: e[1] };
});

score:1

shortcut is called underscore.js

npm install underscore

using that fine lib you can do:

var data = _.map(_.zip(wordsArray, computationArray), function(v){
   return {words: v[0], count: v[1]};
});

Related Query