Ultimately, I want to create an object:
newData = {
column1: "",
column2: "",
column3: "",
...
columnN: ""
}
column names come from another array of objects, which is essentially a global variable tableColumns:
tableColumns = [
{headerName: "column1", field: "c1", editable: false},
{headerName: "column2", field: "c2", editable: false},
{headerName: "column3", field: "c3", editable: false},
{headerName: "column4", field: "c4", editable: false}
]
Without any hard coding, how can I dynamically create newData via looping through this.tableColumns?
column1,column2... innewDataobject? Are they empty or null?