const list = [['one',1],['two',2], ['three', 3]];
const obj = {};
list.forEach(e => {
obj[e[0]] = e[1];
})
console.log(JSON.stringify(obj,undefined,4))
/* Result
{
"one": 1,
"two": 2,
"three": 3
}
*/
stuff = function (thing, callback) {
var inputs = $('div.quantity > input').map(function(){
return {
[this.attr('name')]: this.attr('value'),
};
})
callback(null, inputs);
}