title: jquery xml find node with value
body: <p>Hi friends I have below code in XML file. I need to find the value of <code>&lt;x&gt; &lt;metadata&gt; &lt;field&gt;&lt;name&gt;work&lt;/name&gt;&lt;value&gt;</code> based on <code>y</code> tag value.</p>
  
  <h1>XML File</h1>
  
  <pre><code>&lt;x&gt;
  &lt;y&gt;12&lt;/y&gt;
  &lt;metadata&gt;
  &lt;field&gt;
  &lt;name&gt;1234&lt;/name&gt;
  &lt;value&gt;qqqqqq&lt;/value&gt;
  &lt;/field&gt;
  &lt;field&gt;
  &lt;name&gt;work&lt;/name&gt;
  &lt;value&gt;true&lt;/value&gt;
  &lt;/field&gt;
  &lt;/metadata&gt;
  &lt;/X&gt;
  &lt;x&gt;
  &lt;y&gt;14&lt;/y&gt;
  &lt;metadata&gt;
  &lt;field&gt;
  &lt;name&gt;5678&lt;/name&gt;
  &lt;value&gt;wwwww&lt;/value&gt;
  &lt;/field&gt;
  &lt;field&gt;
  &lt;name&gt;work&lt;/name&gt;
  &lt;value&gt;false&lt;/value&gt;
  &lt;/field&gt;
  &lt;/metadata&gt;
  &lt;/X&gt;
  </code></pre>
  
  <h1>My code</h1>
  
  <pre><code>y=14;
  $.ajax({
          type: "GET" ,
          url: "../JRF/JRF.xml" ,
          dataType: "xml" ,
          success: function(xml) {
  
              $(xml).find('x').each(function(){
                  if(y == $(this).find('y').text())
                  {
                      ?????????
                  }
  
              }); 
              }       
          });
  </code></pre>
  
  <p>Can u help me to get the value of <code>&lt;value&gt;</code> <code>true</code> or <code>false</code> and I have to store the value in a hidden input text box.</p>