Loop each value pair with $.each() - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:each

Description

Loop each value pair with $.each()

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.5.2.js"></script> 
      <script type="text/javascript">
    $(function(){/*ww w  .  j a v a 2 s .  c  o m*/
var response =  {"test": "test1"};
$.each(response, function(key, value) {
  console.log(key + ' -> ' + value);
});
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials