I'm working with a simple reactive form and after entering firstName, lastName and Answer I'm able to print out the values in the console like this:
{firstName: "Peter", lastName: "Smith", answer: {…}}
However, I want to print out the value of answer as a simple string and NOT an object.
Expected Result:
{firstName:"Peter", lastName:"Smith", answer:'Yes'}
Does anyone have any idea how to make this happen?
Here's my code: LIVE DEMO
console.logthis instead:Object.assign({}, this.searchform.value, { answer: this.searchform.value.answer.label })- Daniel W Strimpel