JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <a href="#" class="link">asd</a>
  [I want get this text]
  <a href="#" class="link">asd</a>
  Anouther text i dont need.
</div>

JavaScript

$(function(){

    var a = $(".container a")[0];
    var textNode = a.nextSibling;
    var text = textNode.textContent;
      
    console.log(text);
});