access and output json results - Javascript JSon

Javascript examples for JSon:JSon Object

Description

access and output json results

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {/*from ww w  . jav  a  2  s .co  m*/
var data = [{"my":"free","quantity":1,"term":12,"id":1},
{"my":"basic","quantity":1,"term":24,"id":1},
{"my":"full","quantity":1,"term":12,"id":2}];
for (var i=0; i<data.length; i++) {
    console.log(data[i].my);
}
    });

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

Related Tutorials