title: Get only child nodes of anchor (a) type
body: <p>I have this code:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="inner-container"&gt;
      &lt;h4&gt;Title&lt;/h4&gt;
      &lt;a href=""&gt;&lt;img src="some_url" /&gt;&lt;/a&gt;
      &lt;a href=""&gt;&lt;img src="some_url" /&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="inner-container"&gt;
      &lt;h4&gt;Title&lt;/h4&gt;
      &lt;a href=""&gt;&lt;img src="some_url" /&gt;&lt;/a&gt;
      &lt;a href=""&gt;&lt;img src="some_url" /&gt;&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In js I have a variable which gets into JS object all the nodes of an "el" element:</p>
  
  <pre><code>var thumbElements = el.childNodes;
  //display in console
  console.log("thumbElements", thumbElements);
  </code></pre>
  
  <p>The element is tag of "container" class. Now, this object contains all the nodes including H4. How can I remove h4 and apply it only for an "a" elements only. I think I should find another method which gets only an "a" elements only rather then converting it in a loop, because I've noticed that in this object there are additional information like nextElementSibling, nextSibling, previousElementSibling, etc. so it's all connected.</p>