title: How can i get that value
body: <p>I have a program, but it's too big to spam it here, so I made a fiddle to illustrate my problem.</p>
  
  <p>I need to catch and store in a variable the number <code>6</code>, but alert gives me <code>undefined</code> or <code>[object]</code>. Can you help me please?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;1&lt;/li&gt;
      &lt;li&gt;2&lt;/li&gt;
      &lt;li class = "middle_item"&gt;
          &lt;a&gt;3&lt;/a&gt;
          &lt;a&gt;6&lt;/a&gt;
          &lt;a&gt;7&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;4&lt;/li&gt;
      &lt;li&gt;5&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>var aqui = $("li.middle_item").get("a:nth(2)"); 
  alert(aqui);
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ufkoqeu8/" rel="nofollow">Fiddle here</a></p>