I run this script on a website:
document.forms[0].getElementsByTagName('input')[2]
it's output is:
<input _ngcontent-aui-c140="" pinputtext="" type="password" formcontrolname="password" autocomplete="current-password" class="ng-untouched ng-pristine ng-invalid p-inputtext p-component">
It is what I exactly need (or something comma separated). when I try to convert it into a string uaing JSON.stringify
, it gives a TypeError: Converting circular structure to JSON
error. No problem, I can also convert the circular structure into a string with the help of this: Chrome sendrequest error: TypeError: Converting circular structure to JSON
But it will return so many extra unknown strings! I just only need that inner HTML in a comma-separated format (JSON). what should I do?