Say i have this object:
const element = {
name: 'first_name',
value: 'Joe Blow',
}
how do i use element.name as the key and element.value to construct another object?
for example, i've tried this:
const data = {
element.name: element.value,
}
above example does not work.