I am getting the value from a text field and then inserting the value into a SP list. The problem is that when I check the console the field shows HTML.
var txtField = document.querySelector('#txtField');
I am inserting the following:
some test string
The when console logging the list of objects inserted is see the following in the console:
<div class="...some hexadecimal stuff...">some test string</div>
How do I remove the HTML tags so that I only get "some test string"?