2👍
You could use []
to wrap the computed key :
for (const [key, value] of Object.entries(check)) {
console.log(`${key}: ${value}`);
this.inputFields.push({
[key]:value
})
}
Source:stackexchange.com