title: convert jquery each function to pure javascript
body: <p>I have script to show dropdown in select box. The script currently i am using is</p>
  
  <pre><code>jQuery.each( dslr, function( index, dslrgp) {
      var aslrp= dslrgp.aslrp;
      jQuery.each( aslrp, function(index2, pslrp) {
          var found = 0;
          jQuery.each( dropdown, function(index3, dditem) {
              if (dditem.countryname == pslrp.countryname)
              {
                  foundit = 1;
              }
          });
          if (foundit == 0)
              dropdown.push(pslrp);
  
      });
  });
  </code></pre>
  
  <p>How can i convert this to pure javascript. Because if i am using this</p>
  
  <pre><code>dslr.forEach(function( index, dslrgp) {
      var aslrp= dslrgp.aslrp;
      aslrp.forEach(function(index2, pslrp) {
          var found = 0;
          dropdown.forEach(function(index3, dditem) {
              if (dditem.countryname == pslrp.countryname)
              {
                  foundit = 1;
              }
          });
          if (foundit == 0)
              dropdown.push(pslrp);
  
      });
  });
  </code></pre>
  
  <p>it is not working.</p>