Iterate over JSON objects element using jQuery.each - Javascript jQuery

Javascript examples for jQuery:Json

Description

Iterate over JSON objects element using jQuery.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.4.4.min.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/* w  ww . java2s. com*/
var srv = {"services":"26,29"};
jQuery.each(srv.services.split(","), function(i, v) {
    console.log( v );
});
    });

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

Related Tutorials