// Define an empty object here let dynamicObject = {}; // Add properties dynamically dynamicObject.property1 = "value1"; dynamicObject.property2 = "value2"; // Access properties console.log(dynamicObject.property1); // Output: "value1 here" console.log(dynamicObject.property2); // Output: "value2 here" const dynamicObject = new Object(); // Adding properties dynamically dynamicObject.name = "Jane"; dynamicObject.age = 25; console.log(dynamicObject); 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); }