I am trying to create an object using the field as the property and the value as the value.
onChange(e) {
const field = e.target.name;
const value = e.target.value;
const selectedData = { field, value };
this.props.dispatch(updateForm({ selectedData }));
}
Can anyone help?