title: javascript get value of a field in an HTML object
body: <p>In console.log I have an HTML object like this...</p>
  
  <p><a href="https://i.stack.imgur.com/Z6OOY.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z6OOY.gif" alt="enter image description here"></a></p>
  
  <p>If I wanted to make a javascript to access and display the value of "name" from the HTML object (not by another method) like so...</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    var getName = how to get it?
    console.log(getName);
  &lt;/script&gt;
  </code></pre>
  
  <p>... how would I do it?</p>
  
  <p>What if "name" was nested in something like "attributes: NamedNodeMap"? How would I get a nested value?</p>